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

Step 1:
If we divide 1 by 31, we get 0 and a remainder of 1.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtract 0 from 1 to get 1.
Include the next digit (6) from the dividend after 1, then repeat: 16 / 31

Advancing to step 2:
If we divide 16 by 31, we get 0 and a remainder of 16.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtract 0 from 16 to get 16.
Include the next digit (8) from the dividend after 16, then repeat: 168 / 31

Moving on to step 3:
The number 31 fits into 168 5 times, leaving a remainder of 13.
The number 5 becomes the next digit in our result. 
Result so far: 5.0
Subtracting 155 from 168 leaves us with 13.
Append the next digit (8) from the dividend to 13 and continue with: 138 / 31

Step 4:
When dividing 138 by 31, we get 4 with a remainder of 14.
Use 4 as the next digit of our solution. 
Result so far: 54.0
If we subtract 124 from 138, we get 14.
Include the next digit (6) from the dividend after 14, then repeat: 146 / 31

Going ahead to step 5:
31 can be fit into 146 4 times, resulting in a remainder of 22.
The number 4 becomes the next digit in our result. 
Result so far: 544.0
If we subtract 124 from 146, we get 22.
Take the next digit (5) from the dividend and append it to 22, then repeat: 225 / 31

On to step 6:
31 can be fit into 225 7 times, resulting in a remainder of 8.
Use 7 as the next digit of our solution. 
Result so far: 5447.0
If we subtract 217 from 225, we get 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Moving on to step 7:
The number 31 fits into 80 2 times, leaving a remainder of 18.
Record the quotient 2 as the next digit in the result. 
Result so far: 5447.2
Subtract 62 from 80 to get 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Going ahead to step 8:
31 goes into 180 5 times with a remainder of 25.
The number 5 becomes the next digit in our result. 
Result so far: 5447.25
Deduct 155 from 180 and we're left with 25.
Since there are no more digits in the dividend, we add a zero to the remainder making it 250, and continue the process.

Moving on to step 9:
250 divided by 31 is 8 with a remainder of 2.
Write down 8 as next digit of the result. 
Result so far: 5447.258
Deduct 248 from 250 and we're left with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Step 10:
If we divide 20 by 31, we get 0 and a remainder of 20.
Put 0 as the next digit of the answer. 
Result so far: 5447.258
If we subtract 0 from 20, we get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

On to step 11:
31 goes into 200 6 times with a remainder of 14.
The next digit of our result is 6. 
Result so far: 5447.25806
Subtract 186 from 200 to get 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

Moving on to step 12:
The number 31 fits into 140 4 times, leaving a remainder of 16.
The next digit of our result is 4. 
Result so far: 5447.258064
Subtract 124 from 140 to get 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Advancing to step 13:
If we divide 160 by 31, we get 5 and a remainder of 5.
Write down 5 as next digit of the result. 
Result so far: 5447.2580645
Deduct 155 from 160 and we're left with 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Let's proceed to step 14:
31 can be fit into 50 1 times, resulting in a remainder of 19.
Write down 1 as next digit of the result. 
Result so far: 5447.25806451
Subtract 31 from 50 to get 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

The final result is 5447.25806451 with a remainder of 1.9e-08.