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

Moving on to step 1:
When dividing 8 by 31, we get 0 with a remainder of 8.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtracting 0 from 8 leaves us with 8.
Append the next digit (7) from the dividend to 8 and continue with: 87 / 31

Going ahead to step 2:
31 can be fit into 87 2 times, resulting in a remainder of 25.
The next digit of our result is 2. 
Result so far: 2.0
Subtract 62 from 87 to get 25.
Fetch the next digit (0) from the dividend, attach it to 25 and continue: 250 / 31

On to step 3:
The number 31 fits into 250 8 times, leaving a remainder of 2.
The next digit of our result is 8. 
Result so far: 28.0
The remainder is 2 after subtracting 248 from 250.
Bring next digit (6) of the dividend behind the 2 and repeat the process: 26 / 31

Advancing to step 4:
When dividing 26 by 31, we get 0 with a remainder of 26.
Put 0 as the next digit of the answer. 
Result so far: 280.0
Subtracting 0 from 26 leaves us with 26.
Take the next digit (7) from the dividend and append it to 26, then repeat: 267 / 31

Step 5:
31 goes into 267 8 times with a remainder of 19.
Put 8 as the next digit of the answer. 
Result so far: 2808.0
Subtract 248 from 267 to get 19.
Include the next digit (0) from the dividend after 19, then repeat: 190 / 31

Advancing to step 6:
The number 31 fits into 190 6 times, leaving a remainder of 4.
Record the quotient 6 as the next digit in the result. 
Result so far: 28086.0
The remainder is 4 after subtracting 186 from 190.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Step 7:
When dividing 40 by 31, we get 1 with a remainder of 9.
The next digit of our result is 1. 
Result so far: 28086.1
The remainder is 9 after subtracting 31 from 40.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Going ahead to step 8:
31 can be fit into 90 2 times, resulting in a remainder of 28.
Write down 2 as next digit of the result. 
Result so far: 28086.12
Subtract 62 from 90 to get 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

Let's proceed to step 9:
31 goes into 280 9 times with a remainder of 1.
The number 9 becomes the next digit in our result. 
Result so far: 28086.129
Subtracting 279 from 280 leaves us with 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 10:
31 can be fit into 10 0 times, resulting in a remainder of 10.
Put 0 as the next digit of the answer. 
Result so far: 28086.129
If we subtract 0 from 10, we get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Going ahead to step 11:
31 goes into 100 3 times with a remainder of 7.
Use 3 as the next digit of our solution. 
Result so far: 28086.12903
If we subtract 93 from 100, we get 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Moving on to step 12:
When dividing 70 by 31, we get 2 with a remainder of 8.
Record the quotient 2 as the next digit in the result. 
Result so far: 28086.129032
Subtract 62 from 70 to 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.

Advancing to step 13:
31 goes into 80 2 times with a remainder of 18.
Write down 2 as next digit of the result. 
Result so far: 28086.1290322
The remainder is 18 after subtracting 62 from 80.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

In conclusion, the division gives 28086.1290322 with a balance of 1.8e-07.