879876 divided by 31 
The aim is to understand the frequency of 31 in 879876.

Step 1:
31 goes into 8 0 times with a remainder of 8.
Use 0 as the next digit of our solution. 
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

Step 2:
If we divide 87 by 31, we get 2 and a remainder of 25.
Use 2 as the next digit of our solution. 
Result so far: 2.0
The remainder is 25 after subtracting 62 from 87.
Bring next digit (9) of the dividend behind the 25 and repeat the process: 259 / 31

On to step 3:
259 divided by 31 is 8 with a remainder of 11.
The next digit of our result is 8. 
Result so far: 28.0
Subtract 248 from 259 to get 11.
Include the next digit (8) from the dividend after 11, then repeat: 118 / 31

On to step 4:
The number 31 fits into 118 3 times, leaving a remainder of 25.
Put 3 as the next digit of the answer. 
Result so far: 283.0
Subtract 93 from 118 to get 25.
Bring next digit (7) of the dividend behind the 25 and repeat the process: 257 / 31

Going ahead to step 5:
If we divide 257 by 31, we get 8 and a remainder of 9.
Use 8 as the next digit of our solution. 
Result so far: 2838.0
If we subtract 248 from 257, we get 9.
Bring next digit (6) of the dividend behind the 9 and repeat the process: 96 / 31

Going ahead to step 6:
31 goes into 96 3 times with a remainder of 3.
Record the quotient 3 as the next digit in the result. 
Result so far: 28383.0
If we subtract 93 from 96, we get 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 7:
When dividing 30 by 31, we get 0 with a remainder of 30.
Record the quotient 0 as the next digit in the result. 
Result so far: 28383.0
If we take 0 away from 30, we end up with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

On to step 8:
The number 31 fits into 300 9 times, leaving a remainder of 21.
Write down 9 as next digit of the result. 
Result so far: 28383.09
If we subtract 279 from 300, we get 21.
Since there are no more digits in the dividend, we add a zero to the remainder making it 210, and continue the process.

Moving on to step 9:
When dividing 210 by 31, we get 6 with a remainder of 24.
The next digit of our result is 6. 
Result so far: 28383.096
Deduct 186 from 210 and we're left with 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Advancing to step 10:
31 goes into 240 7 times with a remainder of 23.
Put 7 as the next digit of the answer. 
Result so far: 28383.0967
Subtract 217 from 240 to get 23.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Moving on to step 11:
The number 31 fits into 230 7 times, leaving a remainder of 13.
Write down 7 as next digit of the result. 
Result so far: 28383.09677
If we take 217 away from 230, we end up with 13.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

The final outcome is 28383.09677, with a leftover of 1.3e-05.