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

Let's proceed to step 1:
When dividing 3 by 31, we get 0 with a remainder of 3.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 3 leaves us with 3.
Grab the next digit (9) from the dividend, add it to 3, then carry on: 39 / 31

Let's proceed to step 2:
31 can be fit into 39 1 times, resulting in a remainder of 8.
Write down 1 as next digit of the result. 
Result so far: 1.0
Subtracting 31 from 39 leaves us with 8.
Grab the next digit (7) from the dividend, add it to 8, then carry on: 87 / 31

Step 3:
If we divide 87 by 31, we get 2 and a remainder of 25.
The number 2 becomes the next digit in our result. 
Result so far: 12.0
Subtract 62 from 87 to get 25.
Grab the next digit (4) from the dividend, add it to 25, then carry on: 254 / 31

Let's proceed to step 4:
The number 31 fits into 254 8 times, leaving a remainder of 6.
Record the quotient 8 as the next digit in the result. 
Result so far: 128.0
If we subtract 248 from 254, we get 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Going ahead to step 5:
If we divide 60 by 31, we get 1 and a remainder of 29.
Use 1 as the next digit of our solution. 
Result so far: 128.1
Deduct 31 from 60 and we're left with 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 290, and continue the process.

Moving on to step 6:
31 goes into 290 9 times with a remainder of 11.
The next digit of our result is 9. 
Result so far: 128.19
Deduct 279 from 290 and we're left 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.

On to step 7:
31 can be fit into 110 3 times, resulting in a remainder of 17.
Use 3 as the next digit of our solution. 
Result so far: 128.193
If we take 93 away from 110, we end up with 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Step 8:
If we divide 170 by 31, we get 5 and a remainder of 15.
Put 5 as the next digit of the answer. 
Result so far: 128.1935
The remainder is 15 after subtracting 155 from 170.
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:
When dividing 150 by 31, we get 4 with a remainder of 26.
Write down 4 as next digit of the result. 
Result so far: 128.19354
Subtract 124 from 150 to get 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

On to step 10:
31 goes into 260 8 times with a remainder of 12.
Record the quotient 8 as the next digit in the result. 
Result so far: 128.193548
If we subtract 248 from 260, we get 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Step 11:
When dividing 120 by 31, we get 3 with a remainder of 27.
Use 3 as the next digit of our solution. 
Result so far: 128.1935483
The remainder is 27 after subtracting 93 from 120.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Moving on to step 12:
The number 31 fits into 270 8 times, leaving a remainder of 22.
Record the quotient 8 as the next digit in the result. 
Result so far: 128.19354838
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.

Our division results in 128.19354838 with a remaining 2.2e-08.