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

Step 1:
If we divide 6 by 31, we get 0 and a remainder of 6.
The next digit of our result is 0. 
Result so far: 0.0
If we take 0 away from 6, we end up with 6.
Fetch the next digit (3) from the dividend, attach it to 6 and continue: 63 / 31

Moving on to step 2:
63 divided by 31 is 2 with a remainder of 1.
The number 2 becomes the next digit in our result. 
Result so far: 2.0
If we take 62 away from 63, we end up with 1.
Take the next digit (1) from the dividend and append it to 1, then repeat: 11 / 31

Going ahead to step 3:
The number 31 fits into 11 0 times, leaving a remainder of 11.
The number 0 becomes the next digit in our result. 
Result so far: 20.0
Subtract 0 from 11 to get 11.
Bring next digit (9) of the dividend behind the 11 and repeat the process: 119 / 31

Moving on to step 4:
119 divided by 31 is 3 with a remainder of 26.
Use 3 as the next digit of our solution. 
Result so far: 203.0
Subtract 93 from 119 to get 26.
Include the next digit (7) from the dividend after 26, then repeat: 267 / 31

Moving on to step 5:
31 can be fit into 267 8 times, resulting in a remainder of 19.
Put 8 as the next digit of the answer. 
Result so far: 2038.0
Subtract 248 from 267 to get 19.
Bring next digit (4) of the dividend behind the 19 and repeat the process: 194 / 31

Advancing to step 6:
194 divided by 31 is 6 with a remainder of 8.
The number 6 becomes the next digit in our result. 
Result so far: 20386.0
Subtracting 186 from 194 leaves us 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.

Advancing to step 7:
31 can be fit into 80 2 times, resulting in a remainder of 18.
The number 2 becomes the next digit in our result. 
Result so far: 20386.2
If we take 62 away from 80, we end up 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.

Going ahead to step 8:
31 goes into 180 5 times with a remainder of 25.
Record the quotient 5 as the next digit in the result. 
Result so far: 20386.25
Subtracting 155 from 180 leaves us 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.

Step 9:
250 divided by 31 is 8 with a remainder of 2.
Record the quotient 8 as the next digit in the result. 
Result so far: 20386.258
Subtract 248 from 250 to 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 10:
When dividing 20 by 31, we get 0 with a remainder of 20.
Record the quotient 0 as the next digit in the result. 
Result so far: 20386.258
The remainder is 20 after subtracting 0 from 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

On to step 11:
31 can be fit into 200 6 times, resulting in a remainder of 14.
Use 6 as the next digit of our solution. 
Result so far: 20386.25806
Subtract 186 from 200 to get 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

On to 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: 20386.258064
Subtracting 124 from 140 leaves us 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.

Step 13:
If we divide 160 by 31, we get 5 and a remainder of 5.
The next digit of our result is 5. 
Result so far: 20386.2580645
Subtract 155 from 160 to 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.

Moving on to step 14:
If we divide 50 by 31, we get 1 and a remainder of 19.
The number 1 becomes the next digit in our result. 
Result so far: 20386.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 20386.25806451 and a remainder of 1.9e-08.