Let's divide 521147 by 38
The aim is to understand the frequency of 38 in 521147.

On to step 1:
If we divide 5 by 38, we get 0 and a remainder of 5.
The next digit of our result is 0. 
Result so far: 0.0
If we take 0 away from 5, we end up with 5.
Bring next digit (2) of the dividend behind the 5 and repeat the process: 52 / 38

Moving on to step 2:
38 can be fit into 52 1 times, resulting in a remainder of 14.
Put 1 as the next digit of the answer. 
Result so far: 1.0
Subtracting 38 from 52 leaves us with 14.
Take the next digit (1) from the dividend and append it to 14, then repeat: 141 / 38

Step 3:
38 can be fit into 141 3 times, resulting in a remainder of 27.
Use 3 as the next digit of our solution. 
Result so far: 13.0
The remainder is 27 after subtracting 114 from 141.
Bring next digit (1) of the dividend behind the 27 and repeat the process: 271 / 38

Step 4:
38 goes into 271 7 times with a remainder of 5.
The next digit of our result is 7. 
Result so far: 137.0
If we subtract 266 from 271, we get 5.
Take the next digit (4) from the dividend and append it to 5, then repeat: 54 / 38

Step 5:
38 can be fit into 54 1 times, resulting in a remainder of 16.
Record the quotient 1 as the next digit in the result. 
Result so far: 1371.0
Subtract 38 from 54 to get 16.
Bring next digit (7) of the dividend behind the 16 and repeat the process: 167 / 38

On to step 6:
When dividing 167 by 38, we get 4 with a remainder of 15.
Put 4 as the next digit of the answer. 
Result so far: 13714.0
The remainder is 15 after subtracting 152 from 167.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

On to step 7:
38 can be fit into 150 3 times, resulting in a remainder of 36.
Use 3 as the next digit of our solution. 
Result so far: 13714.3
Subtracting 114 from 150 leaves us with 36.
Since there are no more digits in the dividend, we add a zero to the remainder making it 360, and continue the process.

Moving on to step 8:
When dividing 360 by 38, we get 9 with a remainder of 18.
Put 9 as the next digit of the answer. 
Result so far: 13714.39
The remainder is 18 after subtracting 342 from 360.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Let's proceed to step 9:
38 goes into 180 4 times with a remainder of 28.
Use 4 as the next digit of our solution. 
Result so far: 13714.394
The remainder is 28 after subtracting 152 from 180.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

Let's proceed to step 10:
280 divided by 38 is 7 with a remainder of 14.
The number 7 becomes the next digit in our result. 
Result so far: 13714.3947
The remainder is 14 after subtracting 266 from 280.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

Step 11:
38 goes into 140 3 times with a remainder of 26.
The number 3 becomes the next digit in our result. 
Result so far: 13714.39473
Subtracting 114 from 140 leaves us with 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Let's proceed to step 12:
When dividing 260 by 38, we get 6 with a remainder of 32.
The next digit of our result is 6. 
Result so far: 13714.394736
The remainder is 32 after subtracting 228 from 260.
Since there are no more digits in the dividend, we add a zero to the remainder making it 320, and continue the process.

On to step 13:
If we divide 320 by 38, we get 8 and a remainder of 16.
The next digit of our result is 8. 
Result so far: 13714.3947368
If we subtract 304 from 320, we get 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

On to step 14:
38 goes into 160 4 times with a remainder of 8.
The number 4 becomes the next digit in our result. 
Result so far: 13714.39473684
Deduct 152 from 160 and we're left with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

The final outcome is 13714.39473684, with a leftover of 8e-09.