387460 divided by 31 
The aim is to understand the frequency of 31 in 387460.

On to step 1:
When dividing 3 by 31, we get 0 with a remainder of 3.
The next digit of our result is 0. 
Result so far: 0.0
The remainder is 3 after subtracting 0 from 3.
Fetch the next digit (8) from the dividend, attach it to 3 and continue: 38 / 31

Step 2:
38 divided by 31 is 1 with a remainder of 7.
Use 1 as the next digit of our solution. 
Result so far: 1.0
If we subtract 31 from 38, we get 7.
Fetch the next digit (7) from the dividend, attach it to 7 and continue: 77 / 31

Moving on to step 3:
31 goes into 77 2 times with a remainder of 15.
The next digit of our result is 2. 
Result so far: 12.0
The remainder is 15 after subtracting 62 from 77.
Include the next digit (4) from the dividend after 15, then repeat: 154 / 31

Moving on to step 4:
When dividing 154 by 31, we get 4 with a remainder of 30.
Put 4 as the next digit of the answer. 
Result so far: 124.0
Deduct 124 from 154 and we're left with 30.
Take the next digit (6) from the dividend and append it to 30, then repeat: 306 / 31

On to step 5:
31 can be fit into 306 9 times, resulting in a remainder of 27.
The number 9 becomes the next digit in our result. 
Result so far: 1249.0
If we subtract 279 from 306, we get 27.
Take the next digit (0) from the dividend and append it to 27, then repeat: 270 / 31

Moving on to step 6:
When dividing 270 by 31, we get 8 with a remainder of 22.
Put 8 as the next digit of the answer. 
Result so far: 12498.0
If we subtract 248 from 270, we get 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

Going ahead to step 7:
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: 12498.7
If we subtract 217 from 220, we get 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Moving on to step 8:
31 goes into 30 0 times with a remainder of 30.
Put 0 as the next digit of the answer. 
Result so far: 12498.7
If we subtract 0 from 30, we get 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 9:
300 divided by 31 is 9 with a remainder of 21.
The next digit of our result is 9. 
Result so far: 12498.709
If we take 279 away from 300, we end up 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.

On to step 10:
31 can be fit into 210 6 times, resulting in a remainder of 24.
The next digit of our result is 6. 
Result so far: 12498.7096
Deduct 186 from 210 and we're left with 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Step 11:
240 divided by 31 is 7 with a remainder of 23.
Put 7 as the next digit of the answer. 
Result so far: 12498.70967
The remainder is 23 after subtracting 217 from 240.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Moving on to step 12:
If we divide 230 by 31, we get 7 and a remainder of 13.
The number 7 becomes the next digit in our result. 
Result so far: 12498.709677
The remainder is 13 after subtracting 217 from 230.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

The quotient of the division is 12498.709677, and the remainder is 1.3e-06.