We look at the division of 389833 by 31 
The aim is to understand the frequency of 31 in 389833.

Moving on to step 1:
31 can be fit into 3 0 times, resulting in a remainder of 3.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we subtract 0 from 3, we get 3.
Fetch the next digit (8) from the dividend, attach it to 3 and continue: 38 / 31

Going ahead to step 2:
31 goes into 38 1 times with a remainder of 7.
Put 1 as the next digit of the answer. 
Result so far: 1.0
Subtract 31 from 38 to get 7.
Bring next digit (9) of the dividend behind the 7 and repeat the process: 79 / 31

Advancing to step 3:
The number 31 fits into 79 2 times, leaving a remainder of 17.
Put 2 as the next digit of the answer. 
Result so far: 12.0
The remainder is 17 after subtracting 62 from 79.
Append the next digit (8) from the dividend to 17 and continue with: 178 / 31

Moving on to step 4:
If we divide 178 by 31, we get 5 and a remainder of 23.
Put 5 as the next digit of the answer. 
Result so far: 125.0
Deduct 155 from 178 and we're left with 23.
Include the next digit (3) from the dividend after 23, then repeat: 233 / 31

Going ahead to step 5:
233 divided by 31 is 7 with a remainder of 16.
The next digit of our result is 7. 
Result so far: 1257.0
Subtract 217 from 233 to get 16.
Take the next digit (3) from the dividend and append it to 16, then repeat: 163 / 31

Going ahead to step 6:
If we divide 163 by 31, we get 5 and a remainder of 8.
Use 5 as the next digit of our solution. 
Result so far: 12575.0
Subtract 155 from 163 to get 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Step 7:
If we divide 80 by 31, we get 2 and a remainder of 18.
Put 2 as the next digit of the answer. 
Result so far: 12575.2
Subtract 62 from 80 to get 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Step 8:
31 can be fit into 180 5 times, resulting in a remainder of 25.
Use 5 as the next digit of our solution. 
Result so far: 12575.25
If we subtract 155 from 180, we get 25.
Since there are no more digits in the dividend, we add a zero to the remainder making it 250, and continue the process.

Let's proceed to step 9:
When dividing 250 by 31, we get 8 with a remainder of 2.
Use 8 as the next digit of our solution. 
Result so far: 12575.258
If we take 248 away from 250, 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.

Step 10:
20 divided by 31 is 0 with a remainder of 20.
Use 0 as the next digit of our solution. 
Result so far: 12575.258
Deduct 0 from 20 and we're left 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 11:
31 can be fit into 200 6 times, resulting in a remainder of 14.
Write down 6 as next digit of the result. 
Result so far: 12575.25806
If we subtract 186 from 200, we get 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

Going ahead to step 12:
31 goes into 140 4 times with a remainder of 16.
The number 4 becomes the next digit in our result. 
Result so far: 12575.258064
If we subtract 124 from 140, 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.

Advancing to step 13:
The number 31 fits into 160 5 times, leaving a remainder of 5.
Put 5 as the next digit of the answer. 
Result so far: 12575.2580645
Subtracting 155 from 160 leaves us with 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Let's proceed to step 14:
When dividing 50 by 31, we get 1 with a remainder of 19.
Write down 1 as next digit of the result. 
Result so far: 12575.25806451
The remainder is 19 after subtracting 31 from 50.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

The final outcome is 12575.25806451, with a leftover of 1.9e-08.