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

Step 1:
31 can be fit into 2 0 times, resulting in a remainder of 2.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Deduct 0 from 2 and we're left with 2.
Append the next digit (9) from the dividend to 2 and continue with: 29 / 31

On to step 2:
29 divided by 31 is 0 with a remainder of 29.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
The remainder is 29 after subtracting 0 from 29.
Append the next digit (9) from the dividend to 29 and continue with: 299 / 31

On to step 3:
The number 31 fits into 299 9 times, leaving a remainder of 20.
The number 9 becomes the next digit in our result. 
Result so far: 9.0
If we take 279 away from 299, we end up with 20.
Take the next digit (2) from the dividend and append it to 20, then repeat: 202 / 31

Step 4:
When dividing 202 by 31, we get 6 with a remainder of 16.
Write down 6 as next digit of the result. 
Result so far: 96.0
If we subtract 186 from 202, we get 16.
Bring next digit (9) of the dividend behind the 16 and repeat the process: 169 / 31

Let's proceed to step 5:
If we divide 169 by 31, we get 5 and a remainder of 14.
Put 5 as the next digit of the answer. 
Result so far: 965.0
Subtract 155 from 169 to get 14.
Bring next digit (9) of the dividend behind the 14 and repeat the process: 149 / 31

Step 6:
When dividing 149 by 31, we get 4 with a remainder of 25.
The number 4 becomes the next digit in our result. 
Result so far: 9654.0
If we subtract 124 from 149, we get 25.
Since there are no more digits in the dividend, we add a zero to the remainder making it 250, and continue the process.

Step 7:
31 can be fit into 250 8 times, resulting in a remainder of 2.
Record the quotient 8 as the next digit in the result. 
Result so far: 9654.8
The remainder is 2 after subtracting 248 from 250.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Advancing to step 8:
31 can be fit into 20 0 times, resulting in a remainder of 20.
The number 0 becomes the next digit in our result. 
Result so far: 9654.8
Subtracting 0 from 20 leaves us with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Let's proceed to step 9:
31 goes into 200 6 times with a remainder of 14.
Use 6 as the next digit of our solution. 
Result so far: 9654.806
The remainder is 14 after subtracting 186 from 200.
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 10:
31 can be fit into 140 4 times, resulting in a remainder of 16.
Put 4 as the next digit of the answer. 
Result so far: 9654.8064
The remainder is 16 after subtracting 124 from 140.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Going ahead to step 11:
31 goes into 160 5 times with a remainder of 5.
Use 5 as the next digit of our solution. 
Result so far: 9654.80645
The remainder is 5 after subtracting 155 from 160.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Going ahead to step 12:
31 goes into 50 1 times with a remainder of 19.
Write down 1 as next digit of the result. 
Result so far: 9654.806451
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.

On to step 13:
If we divide 190 by 31, we get 6 and a remainder of 4.
The number 6 becomes the next digit in our result. 
Result so far: 9654.8064516
Deduct 186 from 190 and we're left with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Let's proceed to step 14:
31 goes into 40 1 times with a remainder of 9.
Record the quotient 1 as the next digit in the result. 
Result so far: 9654.80645161
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.

In conclusion, the division gives 9654.80645161 with a balance of 9e-09.