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

On to step 1:
8 divided by 31 is 0 with a remainder of 8.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Deduct 0 from 8 and we're left with 8.
Fetch the next digit (7) from the dividend, attach it to 8 and continue: 87 / 31

Advancing to step 2:
87 divided by 31 is 2 with a remainder of 25.
Record the quotient 2 as the next digit in the result. 
Result so far: 2.0
If we subtract 62 from 87, we get 25.
Fetch the next digit (3) from the dividend, attach it to 25 and continue: 253 / 31

On to step 3:
If we divide 253 by 31, we get 8 and a remainder of 5.
The next digit of our result is 8. 
Result so far: 28.0
If we subtract 248 from 253, we get 5.
Bring next digit (5) of the dividend behind the 5 and repeat the process: 55 / 31

On to step 4:
31 goes into 55 1 times with a remainder of 24.
Put 1 as the next digit of the answer. 
Result so far: 281.0
If we take 31 away from 55, we end up with 24.
Grab the next digit (9) from the dividend, add it to 24, then carry on: 249 / 31

Let's proceed to step 5:
249 divided by 31 is 8 with a remainder of 1.
The next digit of our result is 8. 
Result so far: 2818.0
Subtract 248 from 249 to get 1.
Grab the next digit (4) from the dividend, add it to 1, then carry on: 14 / 31

On to step 6:
If we divide 14 by 31, we get 0 and a remainder of 14.
Put 0 as the next digit of the answer. 
Result so far: 28180.0
Subtracting 0 from 14 leaves us with 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

Advancing to step 7:
When dividing 140 by 31, we get 4 with a remainder of 16.
The next digit of our result is 4. 
Result so far: 28180.4
If we subtract 124 from 140, we 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 8:
160 divided by 31 is 5 with a remainder of 5.
The number 5 becomes the next digit in our result. 
Result so far: 28180.45
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.

On to step 9:
31 can be fit into 50 1 times, resulting in a remainder of 19.
Put 1 as the next digit of the answer. 
Result so far: 28180.451
If we subtract 31 from 50, we 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.

Moving on to step 10:
The number 31 fits into 190 6 times, leaving a remainder of 4.
The number 6 becomes the next digit in our result. 
Result so far: 28180.4516
If we subtract 186 from 190, we get 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Going ahead to step 11:
When dividing 40 by 31, we get 1 with a remainder of 9.
Write down 1 as next digit of the result. 
Result so far: 28180.45161
Subtract 31 from 40 to get 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Step 12:
If we divide 90 by 31, we get 2 and a remainder of 28.
Write down 2 as next digit of the result. 
Result so far: 28180.451612
If we take 62 away from 90, we end up with 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

On to step 13:
31 can be fit into 280 9 times, resulting in a remainder of 1.
Use 9 as the next digit of our solution. 
Result so far: 28180.4516129
Subtract 279 from 280 to get 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Moving on to step 14:
If we divide 10 by 31, we get 0 and a remainder of 10.
The next digit of our result is 0. 
Result so far: 28180.4516129
Subtracting 0 from 10 leaves us with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

The quotient of the division is 28180.4516129, and the remainder is 1e-08.