We look at the division of 515700 by 38 
The aim is to understand the frequency of 38 in 515700.

On to step 1:
When dividing 5 by 38, we get 0 with a remainder of 5.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtract 0 from 5 to get 5.
Grab the next digit (1) from the dividend, add it to 5, then carry on: 51 / 38

Step 2:
38 goes into 51 1 times with a remainder of 13.
Write down 1 as next digit of the result. 
Result so far: 1.0
If we take 38 away from 51, we end up with 13.
Include the next digit (5) from the dividend after 13, then repeat: 135 / 38

On to step 3:
When dividing 135 by 38, we get 3 with a remainder of 21.
Use 3 as the next digit of our solution. 
Result so far: 13.0
Subtract 114 from 135 to get 21.
Append the next digit (7) from the dividend to 21 and continue with: 217 / 38

Going ahead to step 4:
38 can be fit into 217 5 times, resulting in a remainder of 27.
The number 5 becomes the next digit in our result. 
Result so far: 135.0
The remainder is 27 after subtracting 190 from 217.
Include the next digit (0) from the dividend after 27, then repeat: 270 / 38

Step 5:
The number 38 fits into 270 7 times, leaving a remainder of 4.
The next digit of our result is 7. 
Result so far: 1357.0
If we take 266 away from 270, we end up with 4.
Include the next digit (0) from the dividend after 4, then repeat: 40 / 38

Advancing to step 6:
40 divided by 38 is 1 with a remainder of 2.
Put 1 as the next digit of the answer. 
Result so far: 13571.0
If we take 38 away from 40, we end up with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Moving on to step 7:
38 goes into 20 0 times with a remainder of 20.
The number 0 becomes the next digit in our result. 
Result so far: 13571.0
Subtracting 0 from 20 leaves us with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Moving on to step 8:
The number 38 fits into 200 5 times, leaving a remainder of 10.
Use 5 as the next digit of our solution. 
Result so far: 13571.05
If we subtract 190 from 200, we get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Step 9:
38 can be fit into 100 2 times, resulting in a remainder of 24.
Write down 2 as next digit of the result. 
Result so far: 13571.052
Subtract 76 from 100 to get 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Advancing to step 10:
240 divided by 38 is 6 with a remainder of 12.
Write down 6 as next digit of the result. 
Result so far: 13571.0526
If we take 228 away from 240, we end up with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

On to step 11:
38 goes into 120 3 times with a remainder of 6.
Record the quotient 3 as the next digit in the result. 
Result so far: 13571.05263
Subtract 114 from 120 to get 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Step 12:
38 goes into 60 1 times with a remainder of 22.
Put 1 as the next digit of the answer. 
Result so far: 13571.052631
Subtracting 38 from 60 leaves us with 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

Going ahead to step 13:
38 goes into 220 5 times with a remainder of 30.
Write down 5 as next digit of the result. 
Result so far: 13571.0526315
Subtract 190 from 220 to get 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:
If we divide 300 by 38, we get 7 and a remainder of 34.
The next digit of our result is 7. 
Result so far: 13571.05263157
If we subtract 266 from 300, we get 34.
Since there are no more digits in the dividend, we add a zero to the remainder making it 340, and continue the process.

After the division, we end up with 13571.05263157 and a remainder of 3.4e-08.