We're dividing 386847 by 31 
The aim is to understand the frequency of 31 in 386847.

On to step 1:
The number 31 fits into 3 0 times, leaving a remainder of 3.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtract 0 from 3 to get 3.
Append the next digit (8) from the dividend to 3 and continue with: 38 / 31

Moving on to step 2:
31 can be fit into 38 1 times, resulting in a remainder of 7.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
Subtract 31 from 38 to get 7.
Include the next digit (6) from the dividend after 7, then repeat: 76 / 31

Let's proceed to step 3:
The number 31 fits into 76 2 times, leaving a remainder of 14.
The number 2 becomes the next digit in our result. 
Result so far: 12.0
If we take 62 away from 76, we end up with 14.
Fetch the next digit (8) from the dividend, attach it to 14 and continue: 148 / 31

Step 4:
The number 31 fits into 148 4 times, leaving a remainder of 24.
Record the quotient 4 as the next digit in the result. 
Result so far: 124.0
If we subtract 124 from 148, we get 24.
Include the next digit (4) from the dividend after 24, then repeat: 244 / 31

Step 5:
31 can be fit into 244 7 times, resulting in a remainder of 27.
Use 7 as the next digit of our solution. 
Result so far: 1247.0
If we subtract 217 from 244, we get 27.
Bring next digit (7) of the dividend behind the 27 and repeat the process: 277 / 31

Let's proceed to step 6:
If we divide 277 by 31, we get 8 and a remainder of 29.
The next digit of our result is 8. 
Result so far: 12478.0
Subtract 248 from 277 to get 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 290, and continue the process.

Step 7:
When dividing 290 by 31, we get 9 with a remainder of 11.
Record the quotient 9 as the next digit in the result. 
Result so far: 12478.9
Deduct 279 from 290 and we're left with 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

On to step 8:
110 divided by 31 is 3 with a remainder of 17.
Use 3 as the next digit of our solution. 
Result so far: 12478.93
If we take 93 away from 110, we end up 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 9:
If we divide 170 by 31, we get 5 and a remainder of 15.
Record the quotient 5 as the next digit in the result. 
Result so far: 12478.935
Deduct 155 from 170 and we're left 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.

On to step 10:
The number 31 fits into 150 4 times, leaving a remainder of 26.
The number 4 becomes the next digit in our result. 
Result so far: 12478.9354
The remainder is 26 after subtracting 124 from 150.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

On to step 11:
If we divide 260 by 31, we get 8 and a remainder of 12.
Use 8 as the next digit of our solution. 
Result so far: 12478.93548
Subtracting 248 from 260 leaves us 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.

Moving on to step 12:
The number 31 fits into 120 3 times, leaving a remainder of 27.
Put 3 as the next digit of the answer. 
Result so far: 12478.935483
If we subtract 93 from 120, we get 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Moving on to step 13:
270 divided by 31 is 8 with a remainder of 22.
The next digit of our result is 8. 
Result so far: 12478.9354838
Deduct 248 from 270 and we're left 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.

Advancing to step 14:
220 divided by 31 is 7 with a remainder of 3.
Record the quotient 7 as the next digit in the result. 
Result so far: 12478.93548387
Deduct 217 from 220 and we're left 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.

In conclusion, the division gives 12478.93548387 with a balance of 3e-09.