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

Going ahead to step 1:
9 divided by 31 is 0 with a remainder of 9.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 9, we get 9.
Append the next digit (4) from the dividend to 9 and continue with: 94 / 31

Let's proceed to step 2:
31 can be fit into 94 3 times, resulting in a remainder of 1.
Put 3 as the next digit of the answer. 
Result so far: 3.0
Deduct 93 from 94 and we're left with 1.
Take the next digit (7) from the dividend and append it to 1, then repeat: 17 / 31

Step 3:
31 goes into 17 0 times with a remainder of 17.
The number 0 becomes the next digit in our result. 
Result so far: 30.0
Subtract 0 from 17 to get 17.
Take the next digit (9) from the dividend and append it to 17, then repeat: 179 / 31

On to step 4:
31 goes into 179 5 times with a remainder of 24.
Write down 5 as next digit of the result. 
Result so far: 305.0
If we take 155 away from 179, we end up with 24.
Append the next digit (9) from the dividend to 24 and continue with: 249 / 31

Going ahead to step 5:
31 can be fit into 249 8 times, resulting in a remainder of 1.
Record the quotient 8 as the next digit in the result. 
Result so far: 3058.0
Deduct 248 from 249 and we're left with 1.
Bring next digit (8) of the dividend behind the 1 and repeat the process: 18 / 31

Step 6:
18 divided by 31 is 0 with a remainder of 18.
Write down 0 as next digit of the result. 
Result so far: 30580.0
The remainder is 18 after subtracting 0 from 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Step 7:
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: 30580.5
Subtract 155 from 180 to get 25.
Since there are no more digits in the dividend, we add a zero to the remainder making it 250, and continue the process.

Moving on to step 8:
When dividing 250 by 31, we get 8 with a remainder of 2.
Write down 8 as next digit of the result. 
Result so far: 30580.58
If we subtract 248 from 250, we get 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Let's proceed to step 9:
20 divided by 31 is 0 with a remainder of 20.
Write down 0 as next digit of the result. 
Result so far: 30580.58
If we take 0 away from 20, we end up 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 10:
If we divide 200 by 31, we get 6 and a remainder of 14.
Record the quotient 6 as the next digit in the result. 
Result so far: 30580.5806
Deduct 186 from 200 and we're left 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.

Advancing to step 11:
31 can be fit into 140 4 times, resulting in a remainder of 16.
Record the quotient 4 as the next digit in the result. 
Result so far: 30580.58064
If we take 124 away from 140, we end up with 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Let's proceed to step 12:
31 can be fit into 160 5 times, resulting in a remainder of 5.
Record the quotient 5 as the next digit in the result. 
Result so far: 30580.580645
If we subtract 155 from 160, we get 5.
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 13:
The number 31 fits into 50 1 times, leaving a remainder of 19.
Write down 1 as next digit of the result. 
Result so far: 30580.5806451
The remainder is 19 after subtracting 31 from 50.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

Moving on to step 14:
If we divide 190 by 31, we get 6 and a remainder of 4.
Use 6 as the next digit of our solution. 
Result so far: 30580.58064516
If we take 186 away from 190, we end up with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

In conclusion, the division gives 30580.58064516 with a balance of 4e-09.