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

Moving on to step 1:
The number 31 fits into 9 0 times, leaving a remainder of 9.
Put 0 as the next digit of the answer. 
Result so far: 0.0
The remainder is 9 after subtracting 0 from 9.
Bring next digit (9) of the dividend behind the 9 and repeat the process: 99 / 31

Moving on to step 2:
31 can be fit into 99 3 times, resulting in a remainder of 6.
The next digit of our result is 3. 
Result so far: 3.0
Subtracting 93 from 99 leaves us with 6.
Fetch the next digit (1) from the dividend, attach it to 6 and continue: 61 / 31

Advancing to step 3:
If we divide 61 by 31, we get 1 and a remainder of 30.
The number 1 becomes the next digit in our result. 
Result so far: 31.0
Subtract 31 from 61 to get 30.
Grab the next digit (5) from the dividend, add it to 30, then carry on: 305 / 31

Step 4:
31 goes into 305 9 times with a remainder of 26.
Use 9 as the next digit of our solution. 
Result so far: 319.0
If we take 279 away from 305, we end up with 26.
Bring next digit (8) of the dividend behind the 26 and repeat the process: 268 / 31

Let's proceed to step 5:
If we divide 268 by 31, we get 8 and a remainder of 20.
The next digit of our result is 8. 
Result so far: 3198.0
Subtracting 248 from 268 leaves us with 20.
Append the next digit (3) from the dividend to 20 and continue with: 203 / 31

Going ahead to step 6:
31 goes into 203 6 times with a remainder of 17.
Record the quotient 6 as the next digit in the result. 
Result so far: 31986.0
If we subtract 186 from 203, we get 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

On to step 7:
When dividing 170 by 31, we get 5 with a remainder of 15.
The number 5 becomes the next digit in our result. 
Result so far: 31986.5
Subtract 155 from 170 to get 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Moving on to step 8:
The number 31 fits into 150 4 times, leaving a remainder of 26.
Use 4 as the next digit of our solution. 
Result so far: 31986.54
If we subtract 124 from 150, we get 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 9:
260 divided by 31 is 8 with a remainder of 12.
Write down 8 as next digit of the result. 
Result so far: 31986.548
If we take 248 away from 260, we end up 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.

Let's proceed to step 10:
31 can be fit into 120 3 times, resulting in a remainder of 27.
Use 3 as the next digit of our solution. 
Result so far: 31986.5483
If we subtract 93 from 120, we get 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Going ahead to step 11:
When dividing 270 by 31, we get 8 with a remainder of 22.
Use 8 as the next digit of our solution. 
Result so far: 31986.54838
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.

Going ahead to step 12:
220 divided by 31 is 7 with a remainder of 3.
Record the quotient 7 as the next digit in the result. 
Result so far: 31986.548387
If we take 217 away from 220, we end up 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.

On to step 13:
When dividing 30 by 31, we get 0 with a remainder of 30.
Record the quotient 0 as the next digit in the result. 
Result so far: 31986.548387
Subtracting 0 from 30 leaves us with 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 14:
300 divided by 31 is 9 with a remainder of 21.
The number 9 becomes the next digit in our result. 
Result so far: 31986.54838709
Deduct 279 from 300 and we're left 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.

The final outcome is 31986.54838709, with a leftover of 2.1e-08.