We look at the division of 506730 by 39 
The aim is to understand the frequency of 39 in 506730.

On to step 1:
When dividing 5 by 39, we get 0 with a remainder of 5.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we take 0 away from 5, we end up with 5.
Include the next digit (0) from the dividend after 5, then repeat: 50 / 39

Moving on to step 2:
50 divided by 39 is 1 with a remainder of 11.
Write down 1 as next digit of the result. 
Result so far: 1.0
If we subtract 39 from 50, we get 11.
Bring next digit (6) of the dividend behind the 11 and repeat the process: 116 / 39

On to step 3:
39 goes into 116 2 times with a remainder of 38.
Record the quotient 2 as the next digit in the result. 
Result so far: 12.0
If we take 78 away from 116, we end up with 38.
Bring next digit (7) of the dividend behind the 38 and repeat the process: 387 / 39

Let's proceed to step 4:
387 divided by 39 is 9 with a remainder of 36.
Put 9 as the next digit of the answer. 
Result so far: 129.0
If we subtract 351 from 387, we get 36.
Take the next digit (3) from the dividend and append it to 36, then repeat: 363 / 39

Going ahead to step 5:
39 can be fit into 363 9 times, resulting in a remainder of 12.
Write down 9 as next digit of the result. 
Result so far: 1299.0
Subtracting 351 from 363 leaves us with 12.
Append the next digit (0) from the dividend to 12 and continue with: 120 / 39

Step 6:
When dividing 120 by 39, we get 3 with a remainder of 3.
The number 3 becomes the next digit in our result. 
Result so far: 12993.0
If we take 117 away from 120, we end up with 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Advancing to step 7:
When dividing 30 by 39, we get 0 with a remainder of 30.
The next digit of our result is 0. 
Result so far: 12993.0
Subtracting 0 from 30 leaves us with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

On to step 8:
If we divide 300 by 39, we get 7 and a remainder of 27.
Write down 7 as next digit of the result. 
Result so far: 12993.07
Subtract 273 from 300 to get 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Let's proceed to step 9:
39 goes into 270 6 times with a remainder of 36.
Record the quotient 6 as the next digit in the result. 
Result so far: 12993.076
If we subtract 234 from 270, we get 36.
Since there are no more digits in the dividend, we add a zero to the remainder making it 360, and continue the process.

Advancing to step 10:
When dividing 360 by 39, we get 9 with a remainder of 9.
Record the quotient 9 as the next digit in the result. 
Result so far: 12993.0769
The remainder is 9 after subtracting 351 from 360.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Moving on to step 11:
39 goes into 90 2 times with a remainder of 12.
Put 2 as the next digit of the answer. 
Result so far: 12993.07692
Subtract 78 from 90 to get 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Advancing to step 12:
39 can be fit into 120 3 times, resulting in a remainder of 3.
Use 3 as the next digit of our solution. 
Result so far: 12993.076923
If we subtract 117 from 120, we get 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Step 13:
If we divide 30 by 39, we get 0 and a remainder of 30.
Write down 0 as next digit of the result. 
Result so far: 12993.076923
If we take 0 away from 30, we end up with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Step 14:
39 goes into 300 7 times with a remainder of 27.
Record the quotient 7 as the next digit in the result. 
Result so far: 12993.07692307
If we subtract 273 from 300, we get 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Our division results in 12993.07692307 with a remaining 2.7e-08.