401017 divided by 21 
The aim is to understand the frequency of 21 in 401017.

Let's proceed to step 1:
If we divide 4 by 21, we get 0 and a remainder of 4.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtracting 0 from 4 leaves us with 4.
Grab the next digit (0) from the dividend, add it to 4, then carry on: 40 / 21

On to step 2:
21 can be fit into 40 1 times, resulting in a remainder of 19.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
The remainder is 19 after subtracting 21 from 40.
Include the next digit (1) from the dividend after 19, then repeat: 191 / 21

Advancing to step 3:
21 goes into 191 9 times with a remainder of 2.
The number 9 becomes the next digit in our result. 
Result so far: 19.0
Subtract 189 from 191 to get 2.
Append the next digit (0) from the dividend to 2 and continue with: 20 / 21

Advancing to step 4:
If we divide 20 by 21, we get 0 and a remainder of 20.
Record the quotient 0 as the next digit in the result. 
Result so far: 190.0
Subtract 0 from 20 to get 20.
Take the next digit (1) from the dividend and append it to 20, then repeat: 201 / 21

Advancing to step 5:
21 can be fit into 201 9 times, resulting in a remainder of 12.
The number 9 becomes the next digit in our result. 
Result so far: 1909.0
If we take 189 away from 201, we end up with 12.
Fetch the next digit (7) from the dividend, attach it to 12 and continue: 127 / 21

Moving on to step 6:
127 divided by 21 is 6 with a remainder of 1.
Put 6 as the next digit of the answer. 
Result so far: 19096.0
Deduct 126 from 127 and we're left with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Moving on to step 7:
If we divide 10 by 21, we get 0 and a remainder of 10.
Record the quotient 0 as the next digit in the result. 
Result so far: 19096.0
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.

Step 8:
If we divide 100 by 21, we get 4 and a remainder of 16.
Use 4 as the next digit of our solution. 
Result so far: 19096.04
If we take 84 away from 100, 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.

Step 9:
21 can be fit into 160 7 times, resulting in a remainder of 13.
Write down 7 as next digit of the result. 
Result so far: 19096.047
The remainder is 13 after subtracting 147 from 160.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

On to step 10:
21 goes into 130 6 times with a remainder of 4.
Use 6 as the next digit of our solution. 
Result so far: 19096.0476
The remainder is 4 after subtracting 126 from 130.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Step 11:
If we divide 40 by 21, we get 1 and a remainder of 19.
Write down 1 as next digit of the result. 
Result so far: 19096.04761
If we subtract 21 from 40, we get 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 12:
If we divide 190 by 21, we get 9 and a remainder of 1.
The next digit of our result is 9. 
Result so far: 19096.047619
Deduct 189 from 190 and we're left with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

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

Step 14:
21 goes into 100 4 times with a remainder of 16.
The number 4 becomes the next digit in our result. 
Result so far: 19096.04761904
If we take 84 away from 100, 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.

After the division, we end up with 19096.04761904 and a remainder of 1.6e-08.