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

On to step 1:
If we divide 1 by 31, we get 0 and a remainder of 1.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we take 0 away from 1, we end up with 1.
Append the next digit (5) from the dividend to 1 and continue with: 15 / 31

Step 2:
The number 31 fits into 15 0 times, leaving a remainder of 15.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtract 0 from 15 to get 15.
Take the next digit (3) from the dividend and append it to 15, then repeat: 153 / 31

Step 3:
If we divide 153 by 31, we get 4 and a remainder of 29.
Write down 4 as next digit of the result. 
Result so far: 4.0
If we take 124 away from 153, we end up with 29.
Include the next digit (6) from the dividend after 29, then repeat: 296 / 31

Let's proceed to step 4:
31 goes into 296 9 times with a remainder of 17.
Use 9 as the next digit of our solution. 
Result so far: 49.0
If we take 279 away from 296, we end up with 17.
Include the next digit (7) from the dividend after 17, then repeat: 177 / 31

Step 5:
If we divide 177 by 31, we get 5 and a remainder of 22.
Put 5 as the next digit of the answer. 
Result so far: 495.0
Subtracting 155 from 177 leaves us with 22.
Fetch the next digit (1) from the dividend, attach it to 22 and continue: 221 / 31

On to step 6:
31 can be fit into 221 7 times, resulting in a remainder of 4.
Write down 7 as next digit of the result. 
Result so far: 4957.0
If we subtract 217 from 221, we get 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Going ahead to step 7:
When dividing 40 by 31, we get 1 with a remainder of 9.
Put 1 as the next digit of the answer. 
Result so far: 4957.1
Subtract 31 from 40 to get 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

On to step 8:
The number 31 fits into 90 2 times, leaving a remainder of 28.
Record the quotient 2 as the next digit in the result. 
Result so far: 4957.12
If we subtract 62 from 90, we get 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

Advancing to step 9:
280 divided by 31 is 9 with a remainder of 1.
Use 9 as the next digit of our solution. 
Result so far: 4957.129
If we subtract 279 from 280, we get 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Let's proceed to step 10:
When dividing 10 by 31, we get 0 with a remainder of 10.
Use 0 as the next digit of our solution. 
Result so far: 4957.129
Deduct 0 from 10 and we're left with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Advancing to step 11:
100 divided by 31 is 3 with a remainder of 7.
Use 3 as the next digit of our solution. 
Result so far: 4957.12903
If we take 93 away from 100, we end up with 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Let's proceed to step 12:
If we divide 70 by 31, we get 2 and a remainder of 8.
The next digit of our result is 2. 
Result so far: 4957.129032
If we subtract 62 from 70, we get 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

On to step 13:
If we divide 80 by 31, we get 2 and a remainder of 18.
Record the quotient 2 as the next digit in the result. 
Result so far: 4957.1290322
Subtract 62 from 80 to get 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

The final outcome is 4957.1290322, with a leftover of 1.8e-07.