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

Advancing to step 1:
31 can be fit into 8 0 times, resulting in a remainder of 8.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtracting 0 from 8 leaves us with 8.
Fetch the next digit (6) from the dividend, attach it to 8 and continue: 86 / 31

Advancing to step 2:
31 can be fit into 86 2 times, resulting in a remainder of 24.
Write down 2 as next digit of the result. 
Result so far: 2.0
Subtracting 62 from 86 leaves us with 24.
Bring next digit (1) of the dividend behind the 24 and repeat the process: 241 / 31

On to step 3:
31 can be fit into 241 7 times, resulting in a remainder of 24.
The number 7 becomes the next digit in our result. 
Result so far: 27.0
Subtract 217 from 241 to get 24.
Fetch the next digit (5) from the dividend, attach it to 24 and continue: 245 / 31

Let's proceed to step 4:
31 goes into 245 7 times with a remainder of 28.
Write down 7 as next digit of the result. 
Result so far: 277.0
Deduct 217 from 245 and we're left with 28.
Fetch the next digit (0) from the dividend, attach it to 28 and continue: 280 / 31

Going ahead to step 5:
31 can be fit into 280 9 times, resulting in a remainder of 1.
The number 9 becomes the next digit in our result. 
Result so far: 2779.0
Subtracting 279 from 280 leaves us with 1.
Grab the next digit (1) from the dividend, add it to 1, then carry on: 11 / 31

On to step 6:
If we divide 11 by 31, we get 0 and a remainder of 11.
Use 0 as the next digit of our solution. 
Result so far: 27790.0
The remainder is 11 after subtracting 0 from 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 7:
If we divide 110 by 31, we get 3 and a remainder of 17.
The next digit of our result is 3. 
Result so far: 27790.3
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.

Step 8:
170 divided by 31 is 5 with a remainder of 15.
Put 5 as the next digit of the answer. 
Result so far: 27790.35
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.

Step 9:
150 divided by 31 is 4 with a remainder of 26.
Write down 4 as next digit of the result. 
Result so far: 27790.354
Subtract 124 from 150 to get 26.
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 10:
If we divide 260 by 31, we get 8 and a remainder of 12.
The number 8 becomes the next digit in our result. 
Result so far: 27790.3548
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.

Going ahead to step 11:
120 divided by 31 is 3 with a remainder of 27.
Write down 3 as next digit of the result. 
Result so far: 27790.35483
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.

Going ahead to step 12:
31 goes into 270 8 times with a remainder of 22.
Put 8 as the next digit of the answer. 
Result so far: 27790.354838
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.

Moving on to step 13:
220 divided by 31 is 7 with a remainder of 3.
Put 7 as the next digit of the answer. 
Result so far: 27790.3548387
Subtracting 217 from 220 leaves us 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.

Step 14:
If we divide 30 by 31, we get 0 and a remainder of 30.
The number 0 becomes the next digit in our result. 
Result so far: 27790.3548387
Subtract 0 from 30 to 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.

The final outcome is 27790.3548387, with a leftover of 3e-08.