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

On to step 1:
The number 39 fits into 3 0 times, leaving a remainder of 3.
The next digit of our result is 0. 
Result so far: 0.0
Deduct 0 from 3 and we're left with 3.
Grab the next digit (8) from the dividend, add it to 3, then carry on: 38 / 39

Going ahead to step 2:
When dividing 38 by 39, we get 0 with a remainder of 38.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtract 0 from 38 to get 38.
Take the next digit (5) from the dividend and append it to 38, then repeat: 385 / 39

On to step 3:
If we divide 385 by 39, we get 9 and a remainder of 34.
The number 9 becomes the next digit in our result. 
Result so far: 9.0
The remainder is 34 after subtracting 351 from 385.
Take the next digit (7) from the dividend and append it to 34, then repeat: 347 / 39

On to step 4:
The number 39 fits into 347 8 times, leaving a remainder of 35.
Put 8 as the next digit of the answer. 
Result so far: 98.0
If we take 312 away from 347, we end up with 35.
Include the next digit (4) from the dividend after 35, then repeat: 354 / 39

Let's proceed to step 5:
When dividing 354 by 39, we get 9 with a remainder of 3.
The next digit of our result is 9. 
Result so far: 989.0
Subtract 351 from 354 to get 3.
Fetch the next digit (5) from the dividend, attach it to 3 and continue: 35 / 39

Moving on to step 6:
The number 39 fits into 35 0 times, leaving a remainder of 35.
The next digit of our result is 0. 
Result so far: 9890.0
If we subtract 0 from 35, we get 35.
Since there are no more digits in the dividend, we add a zero to the remainder making it 350, and continue the process.

Going ahead to step 7:
350 divided by 39 is 8 with a remainder of 38.
The next digit of our result is 8. 
Result so far: 9890.8
Subtracting 312 from 350 leaves us with 38.
Since there are no more digits in the dividend, we add a zero to the remainder making it 380, and continue the process.

Going ahead to step 8:
If we divide 380 by 39, we get 9 and a remainder of 29.
The number 9 becomes the next digit in our result. 
Result so far: 9890.89
Subtract 351 from 380 to get 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 290, and continue the process.

Moving on to step 9:
When dividing 290 by 39, we get 7 with a remainder of 17.
Use 7 as the next digit of our solution. 
Result so far: 9890.897
Deduct 273 from 290 and we're left with 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Step 10:
39 goes into 170 4 times with a remainder of 14.
Write down 4 as next digit of the result. 
Result so far: 9890.8974
Deduct 156 from 170 and we're left with 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

On to step 11:
If we divide 140 by 39, we get 3 and a remainder of 23.
Put 3 as the next digit of the answer. 
Result so far: 9890.89743
The remainder is 23 after subtracting 117 from 140.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Going ahead to step 12:
If we divide 230 by 39, we get 5 and a remainder of 35.
Put 5 as the next digit of the answer. 
Result so far: 9890.897435
Deduct 195 from 230 and we're left with 35.
Since there are no more digits in the dividend, we add a zero to the remainder making it 350, and continue the process.

Going ahead to step 13:
39 can be fit into 350 8 times, resulting in a remainder of 38.
Record the quotient 8 as the next digit in the result. 
Result so far: 9890.8974358
Deduct 312 from 350 and we're left with 38.
Since there are no more digits in the dividend, we add a zero to the remainder making it 380, and continue the process.

On to step 14:
If we divide 380 by 39, we get 9 and a remainder of 29.
Record the quotient 9 as the next digit in the result. 
Result so far: 9890.89743589
Subtract 351 from 380 to get 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 290, and continue the process.

Our division results in 9890.89743589 with a remaining 2.9e-08.