395887 ÷ 31 
The aim is to understand the frequency of 31 in 395887.

Advancing to step 1:
When dividing 3 by 31, we get 0 with a remainder of 3.
Use 0 as the next digit of our solution. 
Result so far: 0.0
The remainder is 3 after subtracting 0 from 3.
Include the next digit (9) from the dividend after 3, then repeat: 39 / 31

Step 2:
39 divided by 31 is 1 with a remainder of 8.
Write down 1 as next digit of the result. 
Result so far: 1.0
The remainder is 8 after subtracting 31 from 39.
Grab the next digit (5) from the dividend, add it to 8, then carry on: 85 / 31

Moving on to step 3:
The number 31 fits into 85 2 times, leaving a remainder of 23.
Use 2 as the next digit of our solution. 
Result so far: 12.0
If we take 62 away from 85, we end up with 23.
Fetch the next digit (8) from the dividend, attach it to 23 and continue: 238 / 31

Let's proceed to step 4:
31 goes into 238 7 times with a remainder of 21.
Record the quotient 7 as the next digit in the result. 
Result so far: 127.0
Subtracting 217 from 238 leaves us with 21.
Take the next digit (8) from the dividend and append it to 21, then repeat: 218 / 31

Step 5:
If we divide 218 by 31, we get 7 and a remainder of 1.
Use 7 as the next digit of our solution. 
Result so far: 1277.0
If we subtract 217 from 218, we get 1.
Append the next digit (7) from the dividend to 1 and continue with: 17 / 31

Going ahead to step 6:
17 divided by 31 is 0 with a remainder of 17.
Use 0 as the next digit of our solution. 
Result so far: 12770.0
The remainder is 17 after subtracting 0 from 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Let's proceed to step 7:
When dividing 170 by 31, we get 5 with a remainder of 15.
The next digit of our result is 5. 
Result so far: 12770.5
Subtracting 155 from 170 leaves us 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.

Let's proceed to step 8:
If we divide 150 by 31, we get 4 and a remainder of 26.
The number 4 becomes the next digit in our result. 
Result so far: 12770.54
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.

Advancing to step 9:
260 divided by 31 is 8 with a remainder of 12.
The next digit of our result is 8. 
Result so far: 12770.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.

On to step 10:
31 goes into 120 3 times with a remainder of 27.
Use 3 as the next digit of our solution. 
Result so far: 12770.5483
Subtracting 93 from 120 leaves us 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.

Step 11:
The number 31 fits into 270 8 times, leaving a remainder of 22.
Use 8 as the next digit of our solution. 
Result so far: 12770.54838
If we take 248 away from 270, we end up 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 12:
31 can be fit into 220 7 times, resulting in a remainder of 3.
Use 7 as the next digit of our solution. 
Result so far: 12770.548387
Subtract 217 from 220 to 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 13:
30 divided by 31 is 0 with a remainder of 30.
Use 0 as the next digit of our solution. 
Result so far: 12770.548387
If we take 0 away from 30, we end up 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.

Let's proceed to step 14:
31 can be fit into 300 9 times, resulting in a remainder of 21.
Record the quotient 9 as the next digit in the result. 
Result so far: 12770.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 12770.54838709 and a remainder of 2.1e-08.