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

Going ahead to step 1:
21 goes into 5 0 times with a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtract 0 from 5 to get 5.
Fetch the next digit (2) from the dividend, attach it to 5 and continue: 52 / 21

Going ahead to step 2:
When dividing 52 by 21, we get 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.
Grab the next digit (3) from the dividend, add it to 10, then carry on: 103 / 21

Going ahead to step 3:
21 goes into 103 4 times with a remainder of 19.
The number 4 becomes the next digit in our result. 
Result so far: 24.0
Deduct 84 from 103 and we're left with 19.
Take the next digit (8) from the dividend and append it to 19, then repeat: 198 / 21

Going ahead to step 4:
If we divide 198 by 21, we get 9 and a remainder of 9.
The next digit of our result is 9. 
Result so far: 249.0
If we take 189 away from 198, we end up with 9.
Include the next digit (6) from the dividend after 9, then repeat: 96 / 21

On to step 5:
The number 21 fits into 96 4 times, leaving a remainder of 12.
Use 4 as the next digit of our solution. 
Result so far: 2494.0
The remainder is 12 after subtracting 84 from 96.
Fetch the next digit (6) from the dividend, attach it to 12 and continue: 126 / 21

On to step 6:
21 can be fit into 126 6 times, resulting in a remainder of 0.
The number 6 becomes the next digit in our result. 
Result so far: 24946.0
Subtracting 126 from 126 leaves us with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Step 7:
21 goes into 0 0 times with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 24946.0
Deduct 0 from 0 and we're left with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

On to step 8:
21 can be fit into 0 0 times, resulting in a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 24946.0
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

The final outcome is 24946.0, with a leftover of 0.0.