We look at the division of 524862 by 21 
The aim is to understand the frequency of 21 in 524862.

On to step 1:
5 divided by 21 is 0 with a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtract 0 from 5 to get 5.
Append the next digit (2) from the dividend to 5 and continue with: 52 / 21

Going ahead to step 2:
52 divided by 21 is 2 with a remainder of 10.
The number 2 becomes the next digit in our result. 
Result so far: 2.0
If we take 42 away from 52, we end up with 10.
Bring next digit (4) of the dividend behind the 10 and repeat the process: 104 / 21

Advancing to step 3:
104 divided by 21 is 4 with a remainder of 20.
Write down 4 as next digit of the result. 
Result so far: 24.0
The remainder is 20 after subtracting 84 from 104.
Bring next digit (8) of the dividend behind the 20 and repeat the process: 208 / 21

Step 4:
When dividing 208 by 21, we get 9 with a remainder of 19.
The number 9 becomes the next digit in our result. 
Result so far: 249.0
Deduct 189 from 208 and we're left with 19.
Take the next digit (6) from the dividend and append it to 19, then repeat: 196 / 21

Advancing to step 5:
When dividing 196 by 21, we get 9 with a remainder of 7.
Record the quotient 9 as the next digit in the result. 
Result so far: 2499.0
If we take 189 away from 196, we end up with 7.
Grab the next digit (2) from the dividend, add it to 7, then carry on: 72 / 21

On to step 6:
21 can be fit into 72 3 times, resulting in a remainder of 9.
The next digit of our result is 3. 
Result so far: 24993.0
Deduct 63 from 72 and we're left 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 7:
21 can be fit into 90 4 times, resulting in a remainder of 6.
Put 4 as the next digit of the answer. 
Result so far: 24993.4
Subtracting 84 from 90 leaves us with 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Moving on to step 8:
The number 21 fits into 60 2 times, leaving a remainder of 18.
The next digit of our result is 2. 
Result so far: 24993.42
The remainder is 18 after subtracting 42 from 60.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Moving on to step 9:
21 can be fit into 180 8 times, resulting in a remainder of 12.
The number 8 becomes the next digit in our result. 
Result so far: 24993.428
The remainder is 12 after subtracting 168 from 180.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Advancing to step 10:
The number 21 fits into 120 5 times, leaving a remainder of 15.
Record the quotient 5 as the next digit in the result. 
Result so far: 24993.4285
Subtract 105 from 120 to get 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Let's proceed to step 11:
If we divide 150 by 21, we get 7 and a remainder of 3.
Write down 7 as next digit of the result. 
Result so far: 24993.42857
The remainder is 3 after subtracting 147 from 150.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Moving on to step 12:
30 divided by 21 is 1 with a remainder of 9.
Record the quotient 1 as the next digit in the result. 
Result so far: 24993.428571
If we take 21 away from 30, 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.

Step 13:
21 goes into 90 4 times with a remainder of 6.
The next digit of our result is 4. 
Result so far: 24993.4285714
Subtract 84 from 90 to 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.

Moving on to step 14:
If we divide 60 by 21, we get 2 and a remainder of 18.
Write down 2 as next digit of the result. 
Result so far: 24993.42857142
The remainder is 18 after subtracting 42 from 60.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

The quotient of the division is 24993.42857142, and the remainder is 1.8e-08.