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

On to step 1:
38 goes into 5 0 times with a remainder of 5.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 5 leaves us with 5.
Append the next digit (0) from the dividend to 5 and continue with: 50 / 38

Let's proceed to step 2:
When dividing 50 by 38, we get 1 with a remainder of 12.
Put 1 as the next digit of the answer. 
Result so far: 1.0
Subtract 38 from 50 to get 12.
Grab the next digit (2) from the dividend, add it to 12, then carry on: 122 / 38

Going ahead to step 3:
When dividing 122 by 38, we get 3 with a remainder of 8.
Write down 3 as next digit of the result. 
Result so far: 13.0
If we subtract 114 from 122, we get 8.
Take the next digit (3) from the dividend and append it to 8, then repeat: 83 / 38

On to step 4:
83 divided by 38 is 2 with a remainder of 7.
Use 2 as the next digit of our solution. 
Result so far: 132.0
The remainder is 7 after subtracting 76 from 83.
Bring next digit (9) of the dividend behind the 7 and repeat the process: 79 / 38

Going ahead to step 5:
The number 38 fits into 79 2 times, leaving a remainder of 3.
Use 2 as the next digit of our solution. 
Result so far: 1322.0
Subtract 76 from 79 to get 3.
Append the next digit (3) from the dividend to 3 and continue with: 33 / 38

Advancing to step 6:
38 goes into 33 0 times with a remainder of 33.
The number 0 becomes the next digit in our result. 
Result so far: 13220.0
If we subtract 0 from 33, we get 33.
Since there are no more digits in the dividend, we add a zero to the remainder making it 330, and continue the process.

On to step 7:
38 can be fit into 330 8 times, resulting in a remainder of 26.
The next digit of our result is 8. 
Result so far: 13220.8
The remainder is 26 after subtracting 304 from 330.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Going ahead to step 8:
260 divided by 38 is 6 with a remainder of 32.
The next digit of our result is 6. 
Result so far: 13220.86
Subtract 228 from 260 to get 32.
Since there are no more digits in the dividend, we add a zero to the remainder making it 320, and continue the process.

Let's proceed to step 9:
38 goes into 320 8 times with a remainder of 16.
The next digit of our result is 8. 
Result so far: 13220.868
Deduct 304 from 320 and we're left with 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Going ahead to step 10:
38 can be fit into 160 4 times, resulting in a remainder of 8.
Record the quotient 4 as the next digit in the result. 
Result so far: 13220.8684
If we take 152 away from 160, we end up 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.

Advancing to step 11:
When dividing 80 by 38, we get 2 with a remainder of 4.
The number 2 becomes the next digit in our result. 
Result so far: 13220.86842
Subtract 76 from 80 to get 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Moving on to step 12:
When dividing 40 by 38, we get 1 with a remainder of 2.
The number 1 becomes the next digit in our result. 
Result so far: 13220.868421
Subtract 38 from 40 to get 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

On to step 13:
The number 38 fits into 20 0 times, leaving a remainder of 20.
Use 0 as the next digit of our solution. 
Result so far: 13220.868421
The remainder is 20 after subtracting 0 from 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Step 14:
If we divide 200 by 38, we get 5 and a remainder of 10.
Use 5 as the next digit of our solution. 
Result so far: 13220.86842105
If we take 190 away from 200, we end up with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

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