Let's divide 796598 by 31
The aim is to understand the frequency of 31 in 796598.

Going ahead to step 1:
31 goes into 7 0 times with a remainder of 7.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtract 0 from 7 to get 7.
Take the next digit (9) from the dividend and append it to 7, then repeat: 79 / 31

Going ahead to step 2:
When dividing 79 by 31, we get 2 with a remainder of 17.
The number 2 becomes the next digit in our result. 
Result so far: 2.0
Subtract 62 from 79 to get 17.
Take the next digit (6) from the dividend and append it to 17, then repeat: 176 / 31

Advancing to step 3:
176 divided by 31 is 5 with a remainder of 21.
Use 5 as the next digit of our solution. 
Result so far: 25.0
Deduct 155 from 176 and we're left with 21.
Fetch the next digit (5) from the dividend, attach it to 21 and continue: 215 / 31

Advancing to step 4:
The number 31 fits into 215 6 times, leaving a remainder of 29.
Write down 6 as next digit of the result. 
Result so far: 256.0
If we take 186 away from 215, we end up with 29.
Include the next digit (9) from the dividend after 29, then repeat: 299 / 31

Going ahead to step 5:
The number 31 fits into 299 9 times, leaving a remainder of 20.
The number 9 becomes the next digit in our result. 
Result so far: 2569.0
Deduct 279 from 299 and we're left with 20.
Include the next digit (8) from the dividend after 20, then repeat: 208 / 31

Going ahead to step 6:
When dividing 208 by 31, we get 6 with a remainder of 22.
The number 6 becomes the next digit in our result. 
Result so far: 25696.0
The remainder is 22 after subtracting 186 from 208.
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 7:
When dividing 220 by 31, we get 7 with a remainder of 3.
The next digit of our result is 7. 
Result so far: 25696.7
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.

Let's proceed to step 8:
31 can be fit into 30 0 times, resulting in a remainder of 30.
The number 0 becomes the next digit in our result. 
Result so far: 25696.7
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.

Step 9:
When dividing 300 by 31, we get 9 with a remainder of 21.
The number 9 becomes the next digit in our result. 
Result so far: 25696.709
The remainder is 21 after subtracting 279 from 300.
Since there are no more digits in the dividend, we add a zero to the remainder making it 210, and continue the process.

Moving on to step 10:
If we divide 210 by 31, we get 6 and a remainder of 24.
Use 6 as the next digit of our solution. 
Result so far: 25696.7096
The remainder is 24 after subtracting 186 from 210.
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 11:
The number 31 fits into 240 7 times, leaving a remainder of 23.
Put 7 as the next digit of the answer. 
Result so far: 25696.70967
The remainder is 23 after subtracting 217 from 240.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Moving on to step 12:
If we divide 230 by 31, we get 7 and a remainder of 13.
Put 7 as the next digit of the answer. 
Result so far: 25696.709677
Subtracting 217 from 230 leaves us with 13.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

After the division, we end up with 25696.709677 and a remainder of 1.3e-06.