Let's divide 393872 by 31
The aim is to understand the frequency of 31 in 393872.

Advancing 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
Subtract 0 from 3 to get 3.
Take the next digit (9) from the dividend and append it to 3, then repeat: 39 / 31

Step 2:
31 can be fit into 39 1 times, resulting in a remainder of 8.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Deduct 31 from 39 and we're left with 8.
Take the next digit (3) from the dividend and append it to 8, then repeat: 83 / 31

Advancing to step 3:
When dividing 83 by 31, we get 2 with a remainder of 21.
The next digit of our result is 2. 
Result so far: 12.0
Subtracting 62 from 83 leaves us with 21.
Take the next digit (8) from the dividend and append it to 21, then repeat: 218 / 31

Step 4:
When dividing 218 by 31, we get 7 with a remainder of 1.
The next digit of our result is 7. 
Result so far: 127.0
If we subtract 217 from 218, we get 1.
Include the next digit (7) from the dividend after 1, then repeat: 17 / 31

Advancing to step 5:
17 divided by 31 is 0 with a remainder of 17.
The number 0 becomes the next digit in our result. 
Result so far: 1270.0
Deduct 0 from 17 and we're left with 17.
Bring next digit (2) of the dividend behind the 17 and repeat the process: 172 / 31

Moving on to step 6:
The number 31 fits into 172 5 times, leaving a remainder of 17.
The number 5 becomes the next digit in our result. 
Result so far: 12705.0
Deduct 155 from 172 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.

Going ahead to step 7:
31 can be fit into 170 5 times, resulting in a remainder of 15.
The next digit of our result is 5. 
Result so far: 12705.5
If we take 155 away from 170, we end up with 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Step 8:
The number 31 fits into 150 4 times, leaving a remainder of 26.
Put 4 as the next digit of the answer. 
Result so far: 12705.54
If we subtract 124 from 150, we get 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Moving on to step 9:
31 goes into 260 8 times with a remainder of 12.
Put 8 as the next digit of the answer. 
Result so far: 12705.548
Subtract 248 from 260 to get 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Step 10:
When dividing 120 by 31, we get 3 with a remainder of 27.
The number 3 becomes the next digit in our result. 
Result so far: 12705.5483
If we take 93 away from 120, we end up with 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Going ahead to step 11:
If we divide 270 by 31, we get 8 and a remainder of 22.
Record the quotient 8 as the next digit in the result. 
Result so far: 12705.54838
Subtracting 248 from 270 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.

Moving on to step 12:
31 can be fit into 220 7 times, resulting in a remainder of 3.
Write down 7 as next digit of the result. 
Result so far: 12705.548387
Subtracting 217 from 220 leaves us with 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Advancing to step 13:
31 goes into 30 0 times with a remainder of 30.
Write down 0 as next digit of the result. 
Result so far: 12705.548387
Subtracting 0 from 30 leaves us with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Advancing to step 14:
300 divided by 31 is 9 with a remainder of 21.
The next digit of our result is 9. 
Result so far: 12705.54838709
Deduct 279 from 300 and we're left with 21.
Since there are no more digits in the dividend, we add a zero to the remainder making it 210, and continue the process.

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