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

Going ahead to step 1:
The number 31 fits into 6 0 times, leaving a remainder of 6.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Deduct 0 from 6 and we're left with 6.
Include the next digit (1) from the dividend after 6, then repeat: 61 / 31

On to step 2:
61 divided by 31 is 1 with a remainder of 30.
Put 1 as the next digit of the answer. 
Result so far: 1.0
Subtracting 31 from 61 leaves us with 30.
Fetch the next digit (7) from the dividend, attach it to 30 and continue: 307 / 31

Moving on to step 3:
31 goes into 307 9 times with a remainder of 28.
Write down 9 as next digit of the result. 
Result so far: 19.0
Subtracting 279 from 307 leaves us with 28.
Take the next digit (1) from the dividend and append it to 28, then repeat: 281 / 31

Advancing to step 4:
281 divided by 31 is 9 with a remainder of 2.
The next digit of our result is 9. 
Result so far: 199.0
If we subtract 279 from 281, we get 2.
Take the next digit (1) from the dividend and append it to 2, then repeat: 21 / 31

Advancing to step 5:
21 divided by 31 is 0 with a remainder of 21.
The number 0 becomes the next digit in our result. 
Result so far: 1990.0
If we take 0 away from 21, we end up with 21.
Bring next digit (8) of the dividend behind the 21 and repeat the process: 218 / 31

Advancing to step 6:
If we divide 218 by 31, we get 7 and a remainder of 1.
Record the quotient 7 as the next digit in the result. 
Result so far: 19907.0
Subtract 217 from 218 to get 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

On to step 7:
10 divided by 31 is 0 with a remainder of 10.
Record the quotient 0 as the next digit in the result. 
Result so far: 19907.0
If we take 0 away from 10, we end up with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Going ahead to step 8:
31 can be fit into 100 3 times, resulting in a remainder of 7.
Put 3 as the next digit of the answer. 
Result so far: 19907.03
If we take 93 away from 100, we end up with 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Moving on to step 9:
31 can be fit into 70 2 times, resulting in a remainder of 8.
The next digit of our result is 2. 
Result so far: 19907.032
The remainder is 8 after subtracting 62 from 70.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

On to step 10:
If we divide 80 by 31, we get 2 and a remainder of 18.
Use 2 as the next digit of our solution. 
Result so far: 19907.0322
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.

In conclusion, the division gives 19907.0322 with a balance of 0.00018.