We look at the division of 64040817 by 506 
The aim is to understand the frequency of 506 in 64040817.

On to step 1:
If we divide 6 by 506, we get 0 and a remainder of 6.
The next digit of our result is 0. 
Result so far: 0.0
The remainder is 6 after subtracting 0 from 6.
Bring next digit (4) of the dividend behind the 6 and repeat the process: 64 / 506

Going ahead to step 2:
64 divided by 506 is 0 with a remainder of 64.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 64 and we're left with 64.
Grab the next digit (0) from the dividend, add it to 64, then carry on: 640 / 506

Let's proceed to step 3:
When dividing 640 by 506, we get 1 with a remainder of 134.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Subtracting 506 from 640 leaves us with 134.
Append the next digit (4) from the dividend to 134 and continue with: 1344 / 506

Let's proceed to step 4:
When dividing 1344 by 506, we get 2 with a remainder of 332.
Use 2 as the next digit of our solution. 
Result so far: 12.0
If we take 1012 away from 1344, we end up with 332.
Grab the next digit (0) from the dividend, add it to 332, then carry on: 3320 / 506

Moving on to step 5:
If we divide 3320 by 506, we get 6 and a remainder of 284.
The number 6 becomes the next digit in our result. 
Result so far: 126.0
Subtract 3036 from 3320 to get 284.
Append the next digit (8) from the dividend to 284 and continue with: 2848 / 506

Moving on to step 6:
2848 divided by 506 is 5 with a remainder of 318.
Use 5 as the next digit of our solution. 
Result so far: 1265.0
Subtracting 2530 from 2848 leaves us with 318.
Append the next digit (1) from the dividend to 318 and continue with: 3181 / 506

Advancing to step 7:
506 can be fit into 3181 6 times, resulting in a remainder of 145.
Use 6 as the next digit of our solution. 
Result so far: 12656.0
The remainder is 145 after subtracting 3036 from 3181.
Append the next digit (7) from the dividend to 145 and continue with: 1457 / 506

Let's proceed to step 8:
1457 divided by 506 is 2 with a remainder of 445.
The number 2 becomes the next digit in our result. 
Result so far: 126562.0
The remainder is 445 after subtracting 1012 from 1457.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4450, and continue the process.

Moving on to step 9:
4450 divided by 506 is 8 with a remainder of 402.
Record the quotient 8 as the next digit in the result. 
Result so far: 126562.8
Subtracting 4048 from 4450 leaves us with 402.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4020, and continue the process.

Moving on to step 10:
506 can be fit into 4020 7 times, resulting in a remainder of 478.
Record the quotient 7 as the next digit in the result. 
Result so far: 126562.87
If we subtract 3542 from 4020, we get 478.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4780, and continue the process.

On to step 11:
4780 divided by 506 is 9 with a remainder of 226.
Put 9 as the next digit of the answer. 
Result so far: 126562.879
Deduct 4554 from 4780 and we're left with 226.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2260, and continue the process.

On to step 12:
The number 506 fits into 2260 4 times, leaving a remainder of 236.
Write down 4 as next digit of the result. 
Result so far: 126562.8794
The remainder is 236 after subtracting 2024 from 2260.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2360, and continue the process.

Going ahead to step 13:
2360 divided by 506 is 4 with a remainder of 336.
Put 4 as the next digit of the answer. 
Result so far: 126562.87944
Deduct 2024 from 2360 and we're left with 336.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3360, and continue the process.

The final result is 126562.87944 with a remainder of 0.000336.