840790 divided by 31 
The aim is to understand the frequency of 31 in 840790.

Going ahead to step 1:
31 can be fit into 8 0 times, resulting in a remainder of 8.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtracting 0 from 8 leaves us with 8.
Bring next digit (4) of the dividend behind the 8 and repeat the process: 84 / 31

On to step 2:
84 divided by 31 is 2 with a remainder of 22.
Use 2 as the next digit of our solution. 
Result so far: 2.0
The remainder is 22 after subtracting 62 from 84.
Fetch the next digit (0) from the dividend, attach it to 22 and continue: 220 / 31

Advancing to step 3:
The number 31 fits into 220 7 times, leaving a remainder of 3.
Put 7 as the next digit of the answer. 
Result so far: 27.0
Subtracting 217 from 220 leaves us with 3.
Bring next digit (7) of the dividend behind the 3 and repeat the process: 37 / 31

Advancing to step 4:
31 goes into 37 1 times with a remainder of 6.
Use 1 as the next digit of our solution. 
Result so far: 271.0
If we subtract 31 from 37, we get 6.
Fetch the next digit (9) from the dividend, attach it to 6 and continue: 69 / 31

Step 5:
The number 31 fits into 69 2 times, leaving a remainder of 7.
The number 2 becomes the next digit in our result. 
Result so far: 2712.0
The remainder is 7 after subtracting 62 from 69.
Take the next digit (0) from the dividend and append it to 7, then repeat: 70 / 31

Going ahead to step 6:
70 divided by 31 is 2 with a remainder of 8.
Use 2 as the next digit of our solution. 
Result so far: 27122.0
Deduct 62 from 70 and we're left with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Going ahead to step 7:
If we divide 80 by 31, we get 2 and a remainder of 18.
The number 2 becomes the next digit in our result. 
Result so far: 27122.2
Subtracting 62 from 80 leaves us 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.

Let's proceed to step 8:
The number 31 fits into 180 5 times, leaving a remainder of 25.
The number 5 becomes the next digit in our result. 
Result so far: 27122.25
Deduct 155 from 180 and we're left with 25.
Since there are no more digits in the dividend, we add a zero to the remainder making it 250, and continue the process.

On to step 9:
If we divide 250 by 31, we get 8 and a remainder of 2.
Put 8 as the next digit of the answer. 
Result so far: 27122.258
The remainder is 2 after subtracting 248 from 250.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

On to step 10:
The number 31 fits into 20 0 times, leaving a remainder of 20.
The number 0 becomes the next digit in our result. 
Result so far: 27122.258
Subtracting 0 from 20 leaves us with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Going ahead to step 11:
When dividing 200 by 31, we get 6 with a remainder of 14.
Put 6 as the next digit of the answer. 
Result so far: 27122.25806
If we take 186 away from 200, we end up with 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

Step 12:
31 goes into 140 4 times with a remainder of 16.
Record the quotient 4 as the next digit in the result. 
Result so far: 27122.258064
If we subtract 124 from 140, we get 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

On to step 13:
31 goes into 160 5 times with a remainder of 5.
The number 5 becomes the next digit in our result. 
Result so far: 27122.2580645
The remainder is 5 after subtracting 155 from 160.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Advancing to step 14:
31 goes into 50 1 times with a remainder of 19.
Write down 1 as next digit of the result. 
Result so far: 27122.25806451
If we take 31 away from 50, we end up with 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

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