We divide 21581 by 31
The aim is to understand the frequency of 31 in 21581.

On to step 1:
2 divided by 31 is 0 with a remainder of 2.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Deduct 0 from 2 and we're left with 2.
Append the next digit (1) from the dividend to 2 and continue with: 21 / 31

On to step 2:
If we divide 21 by 31, we get 0 and a remainder of 21.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtracting 0 from 21 leaves us with 21.
Bring next digit (5) of the dividend behind the 21 and repeat the process: 215 / 31

Let's proceed to step 3:
31 can be fit into 215 6 times, resulting in a remainder of 29.
Write down 6 as next digit of the result. 
Result so far: 6.0
Deduct 186 from 215 and we're left with 29.
Take the next digit (8) from the dividend and append it to 29, then repeat: 298 / 31

Going ahead to step 4:
31 can be fit into 298 9 times, resulting in a remainder of 19.
Write down 9 as next digit of the result. 
Result so far: 69.0
Deduct 279 from 298 and we're left with 19.
Append the next digit (1) from the dividend to 19 and continue with: 191 / 31

Advancing to step 5:
When dividing 191 by 31, we get 6 with a remainder of 5.
The number 6 becomes the next digit in our result. 
Result so far: 696.0
Subtracting 186 from 191 leaves us with 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 6:
If we divide 50 by 31, we get 1 and a remainder of 19.
Write down 1 as next digit of the result. 
Result so far: 696.1
Subtracting 31 from 50 leaves us 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.

Moving on to step 7:
The number 31 fits into 190 6 times, leaving a remainder of 4.
The number 6 becomes the next digit in our result. 
Result so far: 696.16
Deduct 186 from 190 and we're left 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.

Going ahead to step 8:
If we divide 40 by 31, we get 1 and a remainder of 9.
Record the quotient 1 as the next digit in the result. 
Result so far: 696.161
If we take 31 away from 40, we end up with 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Advancing to step 9:
90 divided by 31 is 2 with a remainder of 28.
The next digit of our result is 2. 
Result so far: 696.1612
The remainder is 28 after subtracting 62 from 90.
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 10:
When dividing 280 by 31, we get 9 with a remainder of 1.
Put 9 as the next digit of the answer. 
Result so far: 696.16129
Subtract 279 from 280 to 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.

Step 11:
The number 31 fits into 10 0 times, leaving a remainder of 10.
The next digit of our result is 0. 
Result so far: 696.16129
The remainder is 10 after subtracting 0 from 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Let's proceed to step 12:
When dividing 100 by 31, we get 3 with a remainder of 7.
Record the quotient 3 as the next digit in the result. 
Result so far: 696.1612903
Subtract 93 from 100 to get 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Going ahead to step 13:
70 divided by 31 is 2 with a remainder of 8.
Use 2 as the next digit of our solution. 
Result so far: 696.16129032
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.

In conclusion, the division gives 696.16129032 with a balance of 8e-09.