We're dividing 816582 by 31 
The aim is to understand the frequency of 31 in 816582.

Advancing to step 1:
If we divide 8 by 31, we get 0 and a remainder of 8.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
The remainder is 8 after subtracting 0 from 8.
Bring next digit (1) of the dividend behind the 8 and repeat the process: 81 / 31

Advancing to step 2:
81 divided by 31 is 2 with a remainder of 19.
Record the quotient 2 as the next digit in the result. 
Result so far: 2.0
Subtracting 62 from 81 leaves us with 19.
Bring next digit (6) of the dividend behind the 19 and repeat the process: 196 / 31

On to step 3:
When dividing 196 by 31, we get 6 with a remainder of 10.
Write down 6 as next digit of the result. 
Result so far: 26.0
If we subtract 186 from 196, we get 10.
Bring next digit (5) of the dividend behind the 10 and repeat the process: 105 / 31

Going ahead to step 4:
If we divide 105 by 31, we get 3 and a remainder of 12.
Record the quotient 3 as the next digit in the result. 
Result so far: 263.0
If we take 93 away from 105, we end up with 12.
Bring next digit (8) of the dividend behind the 12 and repeat the process: 128 / 31

Going ahead to step 5:
The number 31 fits into 128 4 times, leaving a remainder of 4.
Record the quotient 4 as the next digit in the result. 
Result so far: 2634.0
If we take 124 away from 128, we end up with 4.
Append the next digit (2) from the dividend to 4 and continue with: 42 / 31

Let's proceed to step 6:
31 goes into 42 1 times with a remainder of 11.
Record the quotient 1 as the next digit in the result. 
Result so far: 26341.0
If we take 31 away from 42, we end up with 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Going ahead to step 7:
The number 31 fits into 110 3 times, leaving a remainder of 17.
Put 3 as the next digit of the answer. 
Result so far: 26341.3
If we subtract 93 from 110, 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.

Let's proceed to step 8:
If we divide 170 by 31, we get 5 and a remainder of 15.
The next digit of our result is 5. 
Result so far: 26341.35
If we subtract 155 from 170, we 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 9:
If we divide 150 by 31, we get 4 and a remainder of 26.
Record the quotient 4 as the next digit in the result. 
Result so far: 26341.354
The remainder is 26 after subtracting 124 from 150.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Going ahead to step 10:
If we divide 260 by 31, we get 8 and a remainder of 12.
Use 8 as the next digit of our solution. 
Result so far: 26341.3548
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 11:
31 goes into 120 3 times with a remainder of 27.
The next digit of our result is 3. 
Result so far: 26341.35483
Subtract 93 from 120 to 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.

Advancing to step 12:
If we divide 270 by 31, we get 8 and a remainder of 22.
Use 8 as the next digit of our solution. 
Result so far: 26341.354838
Deduct 248 from 270 and we're left 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.

On to step 13:
The number 31 fits into 220 7 times, leaving a remainder of 3.
Write down 7 as next digit of the result. 
Result so far: 26341.3548387
Subtract 217 from 220 to get 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Going ahead to step 14:
30 divided by 31 is 0 with a remainder of 30.
Use 0 as the next digit of our solution. 
Result so far: 26341.3548387
If we take 0 away from 30, we end up 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.

The final outcome is 26341.3548387, with a leftover of 3e-08.