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

Step 1:
31 can be fit into 5 0 times, resulting in a remainder of 5.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we take 0 away from 5, we end up with 5.
Include the next digit (2) from the dividend after 5, then repeat: 52 / 31

Let's proceed to step 2:
If we divide 52 by 31, we get 1 and a remainder of 21.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
The remainder is 21 after subtracting 31 from 52.
Include the next digit (7) from the dividend after 21, then repeat: 217 / 31

Advancing to step 3:
31 goes into 217 7 times with a remainder of 0.
Write down 7 as next digit of the result. 
Result so far: 17.0
If we subtract 217 from 217, we get 0.
Fetch the next digit (7) from the dividend, attach it to 0 and continue: 7 / 31

Let's proceed to step 4:
31 goes into 7 0 times with a remainder of 7.
The number 0 becomes the next digit in our result. 
Result so far: 170.0
If we take 0 away from 7, we end up with 7.
Bring next digit (0) of the dividend behind the 7 and repeat the process: 70 / 31

Let's proceed to step 5:
31 can be fit into 70 2 times, resulting in a remainder of 8.
Record the quotient 2 as the next digit in the result. 
Result so far: 1702.0
If we subtract 62 from 70, we get 8.
Take the next digit (8) from the dividend and append it to 8, then repeat: 88 / 31

On to step 6:
88 divided by 31 is 2 with a remainder of 26.
Put 2 as the next digit of the answer. 
Result so far: 17022.0
If we take 62 away from 88, we end up 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.

Moving on to step 7:
If we divide 260 by 31, we get 8 and a remainder of 12.
The number 8 becomes the next digit in our result. 
Result so far: 17022.8
The remainder is 12 after subtracting 248 from 260.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Going ahead to step 8:
120 divided by 31 is 3 with a remainder of 27.
Write down 3 as next digit of the result. 
Result so far: 17022.83
If we take 93 away from 120, we end up 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.

Let's proceed to step 9:
31 goes into 270 8 times with a remainder of 22.
Use 8 as the next digit of our solution. 
Result so far: 17022.838
The remainder is 22 after subtracting 248 from 270.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

Moving on to step 10:
31 goes into 220 7 times with a remainder of 3.
Record the quotient 7 as the next digit in the result. 
Result so far: 17022.8387
Subtracting 217 from 220 leaves us with 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Moving on to step 11:
31 can be fit into 30 0 times, resulting in a remainder of 30.
Write down 0 as next digit of the result. 
Result so far: 17022.8387
If we subtract 0 from 30, we get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Advancing to step 12:
The number 31 fits into 300 9 times, leaving a remainder of 21.
The number 9 becomes the next digit in our result. 
Result so far: 17022.838709
Subtracting 279 from 300 leaves us with 21.
Since there are no more digits in the dividend, we add a zero to the remainder making it 210, and continue the process.

Step 13:
210 divided by 31 is 6 with a remainder of 24.
Record the quotient 6 as the next digit in the result. 
Result so far: 17022.8387096
If we take 186 away from 210, we end up 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.

Going ahead to step 14:
If we divide 240 by 31, we get 7 and a remainder of 23.
Record the quotient 7 as the next digit in the result. 
Result so far: 17022.83870967
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.

After the division, we end up with 17022.83870967 and a remainder of 2.3e-08.