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

Advancing to step 1:
8 divided by 31 is 0 with a remainder of 8.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we take 0 away from 8, we end up with 8.
Grab the next digit (5) from the dividend, add it to 8, then carry on: 85 / 31

Let's proceed to step 2:
31 can be fit into 85 2 times, resulting in a remainder of 23.
Use 2 as the next digit of our solution. 
Result so far: 2.0
Subtract 62 from 85 to get 23.
Grab the next digit (2) from the dividend, add it to 23, then carry on: 232 / 31

Advancing to step 3:
31 goes into 232 7 times with a remainder of 15.
Record the quotient 7 as the next digit in the result. 
Result so far: 27.0
The remainder is 15 after subtracting 217 from 232.
Fetch the next digit (2) from the dividend, attach it to 15 and continue: 152 / 31

Let's proceed to step 4:
If we divide 152 by 31, we get 4 and a remainder of 28.
Record the quotient 4 as the next digit in the result. 
Result so far: 274.0
If we subtract 124 from 152, we get 28.
Grab the next digit (5) from the dividend, add it to 28, then carry on: 285 / 31

Step 5:
If we divide 285 by 31, we get 9 and a remainder of 6.
Put 9 as the next digit of the answer. 
Result so far: 2749.0
If we subtract 279 from 285, we get 6.
Include the next digit (8) from the dividend after 6, then repeat: 68 / 31

Going ahead to step 6:
If we divide 68 by 31, we get 2 and a remainder of 6.
Use 2 as the next digit of our solution. 
Result so far: 27492.0
If we take 62 away from 68, 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.

Step 7:
31 can be fit into 60 1 times, resulting in a remainder of 29.
The next digit of our result is 1. 
Result so far: 27492.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.

Going ahead to step 8:
290 divided by 31 is 9 with a remainder of 11.
Record the quotient 9 as the next digit in the result. 
Result so far: 27492.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:
If we divide 110 by 31, we get 3 and a remainder of 17.
The next digit of our result is 3. 
Result so far: 27492.193
Subtracting 93 from 110 leaves us with 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Going ahead to step 10:
31 goes into 170 5 times with a remainder of 15.
Use 5 as the next digit of our solution. 
Result so far: 27492.1935
The remainder is 15 after subtracting 155 from 170.
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:
31 goes into 150 4 times with a remainder of 26.
Put 4 as the next digit of the answer. 
Result so far: 27492.19354
Deduct 124 from 150 and we're left with 26.
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:
The number 31 fits into 260 8 times, leaving a remainder of 12.
Use 8 as the next digit of our solution. 
Result so far: 27492.193548
Deduct 248 from 260 and we're left with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Step 13:
31 can be fit into 120 3 times, resulting in a remainder of 27.
Put 3 as the next digit of the answer. 
Result so far: 27492.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.

Moving on to step 14:
31 can be fit into 270 8 times, resulting in a remainder of 22.
The next digit of our result is 8. 
Result so far: 27492.19354838
Subtracting 248 from 270 leaves us with 22.
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 27492.19354838 with a remainder of 2.2e-08.