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

Let's proceed to step 1:
If we divide 5 by 31, we get 0 and a remainder of 5.
Use 0 as the next digit of our solution. 
Result so far: 0.0
The remainder is 5 after subtracting 0 from 5.
Grab the next digit (6) from the dividend, add it to 5, then carry on: 56 / 31

Let's proceed to step 2:
The number 31 fits into 56 1 times, leaving a remainder of 25.
Put 1 as the next digit of the answer. 
Result so far: 1.0
Deduct 31 from 56 and we're left with 25.
Grab the next digit (2) from the dividend, add it to 25, then carry on: 252 / 31

Going ahead to step 3:
The number 31 fits into 252 8 times, leaving a remainder of 4.
Record the quotient 8 as the next digit in the result. 
Result so far: 18.0
If we subtract 248 from 252, we get 4.
Take the next digit (8) from the dividend and append it to 4, then repeat: 48 / 31

Going ahead to step 4:
31 goes into 48 1 times with a remainder of 17.
Put 1 as the next digit of the answer. 
Result so far: 181.0
Subtracting 31 from 48 leaves us with 17.
Grab the next digit (7) from the dividend, add it to 17, then carry on: 177 / 31

On to step 5:
31 goes into 177 5 times with a remainder of 22.
Write down 5 as next digit of the result. 
Result so far: 1815.0
Subtracting 155 from 177 leaves us with 22.
Append the next digit (5) from the dividend to 22 and continue with: 225 / 31

Moving on to step 6:
The number 31 fits into 225 7 times, leaving a remainder of 8.
The next digit of our result is 7. 
Result so far: 18157.0
Subtracting 217 from 225 leaves us with 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 7:
The number 31 fits into 80 2 times, leaving a remainder of 18.
Use 2 as the next digit of our solution. 
Result so far: 18157.2
Deduct 62 from 80 and we're left with 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

On to step 8:
180 divided by 31 is 5 with a remainder of 25.
Use 5 as the next digit of our solution. 
Result so far: 18157.25
Subtract 155 from 180 to 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.

Advancing to step 9:
250 divided by 31 is 8 with a remainder of 2.
The next digit of our result is 8. 
Result so far: 18157.258
If we subtract 248 from 250, we get 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Let's proceed to step 10:
20 divided by 31 is 0 with a remainder of 20.
Use 0 as the next digit of our solution. 
Result so far: 18157.258
The remainder is 20 after subtracting 0 from 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Going ahead to step 11:
200 divided by 31 is 6 with a remainder of 14.
Use 6 as the next digit of our solution. 
Result so far: 18157.25806
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.

Let's proceed to step 12:
If we divide 140 by 31, we get 4 and a remainder of 16.
The number 4 becomes the next digit in our result. 
Result so far: 18157.258064
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.

On to step 13:
The number 31 fits into 160 5 times, leaving a remainder of 5.
Put 5 as the next digit of the answer. 
Result so far: 18157.2580645
If we take 155 away from 160, we end up 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.

Moving on to step 14:
The number 31 fits into 50 1 times, leaving a remainder of 19.
Put 1 as the next digit of the answer. 
Result so far: 18157.25806451
Subtracting 31 from 50 leaves us with 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

The final outcome is 18157.25806451, with a leftover of 1.9e-08.