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

Let's proceed to step 1:
8 divided by 31 is 0 with a remainder of 8.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 8 leaves us with 8.
Include the next digit (7) from the dividend after 8, then repeat: 87 / 31

Going ahead to step 2:
31 can be fit into 87 2 times, resulting in a remainder of 25.
Record the quotient 2 as the next digit in the result. 
Result so far: 2.0
Subtracting 62 from 87 leaves us with 25.
Grab the next digit (4) from the dividend, add it to 25, then carry on: 254 / 31

Advancing to step 3:
254 divided by 31 is 8 with a remainder of 6.
Put 8 as the next digit of the answer. 
Result so far: 28.0
Deduct 248 from 254 and we're left with 6.
Grab the next digit (7) from the dividend, add it to 6, then carry on: 67 / 31

Going ahead to step 4:
31 goes into 67 2 times with a remainder of 5.
Record the quotient 2 as the next digit in the result. 
Result so far: 282.0
Deduct 62 from 67 and we're left with 5.
Include the next digit (0) from the dividend after 5, then repeat: 50 / 31

Going ahead to step 5:
31 goes into 50 1 times with a remainder of 19.
Put 1 as the next digit of the answer. 
Result so far: 2821.0
Subtract 31 from 50 to get 19.
Grab the next digit (2) from the dividend, add it to 19, then carry on: 192 / 31

Let's proceed to step 6:
If we divide 192 by 31, we get 6 and a remainder of 6.
Write down 6 as next digit of the result. 
Result so far: 28216.0
If we take 186 away from 192, we end up with 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Let's proceed to step 7:
The number 31 fits into 60 1 times, leaving a remainder of 29.
The next digit of our result is 1. 
Result so far: 28216.1
If we subtract 31 from 60, we 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.

Step 8:
When dividing 290 by 31, we get 9 with a remainder of 11.
Record the quotient 9 as the next digit in the result. 
Result so far: 28216.19
Subtract 279 from 290 to 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:
The number 31 fits into 110 3 times, leaving a remainder of 17.
Write down 3 as next digit of the result. 
Result so far: 28216.193
If we subtract 93 from 110, we get 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

On to step 10:
The number 31 fits into 170 5 times, leaving a remainder of 15.
The next digit of our result is 5. 
Result so far: 28216.1935
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.

Advancing to step 11:
When dividing 150 by 31, we get 4 with a remainder of 26.
Write down 4 as next digit of the result. 
Result so far: 28216.19354
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 12:
When dividing 260 by 31, we get 8 with a remainder of 12.
Write down 8 as next digit of the result. 
Result so far: 28216.193548
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 13:
The number 31 fits into 120 3 times, leaving a remainder of 27.
The number 3 becomes the next digit in our result. 
Result so far: 28216.1935483
Deduct 93 from 120 and we're left 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:
31 can be fit into 270 8 times, resulting in a remainder of 22.
Write down 8 as next digit of the result. 
Result so far: 28216.19354838
The remainder is 22 after subtracting 248 from 270.
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 28216.19354838 with a remainder of 2.2e-08.