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

Going ahead to step 1:
The number 31 fits into 8 0 times, leaving a remainder of 8.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 8 and we're left with 8.
Take the next digit (6) from the dividend and append it to 8, then repeat: 86 / 31

Step 2:
31 can be fit into 86 2 times, resulting in a remainder of 24.
Use 2 as the next digit of our solution. 
Result so far: 2.0
Subtract 62 from 86 to get 24.
Append the next digit (7) from the dividend to 24 and continue with: 247 / 31

Going ahead to step 3:
If we divide 247 by 31, we get 7 and a remainder of 30.
Use 7 as the next digit of our solution. 
Result so far: 27.0
Subtract 217 from 247 to get 30.
Include the next digit (6) from the dividend after 30, then repeat: 306 / 31

Going ahead to step 4:
31 goes into 306 9 times with a remainder of 27.
Record the quotient 9 as the next digit in the result. 
Result so far: 279.0
Subtracting 279 from 306 leaves us with 27.
Include the next digit (9) from the dividend after 27, then repeat: 279 / 31

Going ahead to step 5:
31 can be fit into 279 9 times, resulting in a remainder of 0.
Use 9 as the next digit of our solution. 
Result so far: 2799.0
Subtracting 279 from 279 leaves us with 0.
Grab the next digit (6) from the dividend, add it to 0, then carry on: 6 / 31

Step 6:
If we divide 6 by 31, we get 0 and a remainder of 6.
Record the quotient 0 as the next digit in the result. 
Result so far: 27990.0
Subtract 0 from 6 to get 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Going ahead to step 7:
When dividing 60 by 31, we get 1 with a remainder of 29.
The next digit of our result is 1. 
Result so far: 27990.1
Subtract 31 from 60 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.

Going ahead to step 8:
31 can be fit into 290 9 times, resulting in a remainder of 11.
The next digit of our result is 9. 
Result so far: 27990.19
If we subtract 279 from 290, we get 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Moving on to step 9:
If we divide 110 by 31, we get 3 and a remainder of 17.
The number 3 becomes the next digit in our result. 
Result so far: 27990.193
The remainder is 17 after subtracting 93 from 110.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Advancing to step 10:
31 goes into 170 5 times with a remainder of 15.
Record the quotient 5 as the next digit in the result. 
Result so far: 27990.1935
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.

Let's proceed to step 11:
If we divide 150 by 31, we get 4 and a remainder of 26.
The next digit of our result is 4. 
Result so far: 27990.19354
If we take 124 away from 150, we end up with 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Going ahead to step 12:
31 can be fit into 260 8 times, resulting in a remainder of 12.
The number 8 becomes the next digit in our result. 
Result so far: 27990.193548
If we subtract 248 from 260, we 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 13:
31 goes into 120 3 times with a remainder of 27.
Record the quotient 3 as the next digit in the result. 
Result so far: 27990.1935483
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.

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

The final result is 27990.19354838 with a remainder of 2.2e-08.