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

On to step 1:
When dividing 5 by 21, we get 0 with a remainder of 5.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 5 and we're left with 5.
Append the next digit (0) from the dividend to 5 and continue with: 50 / 21

Step 2:
21 can be fit into 50 2 times, resulting in a remainder of 8.
The number 2 becomes the next digit in our result. 
Result so far: 2.0
If we take 42 away from 50, we end up with 8.
Append the next digit (2) from the dividend to 8 and continue with: 82 / 21

On to step 3:
The number 21 fits into 82 3 times, leaving a remainder of 19.
Put 3 as the next digit of the answer. 
Result so far: 23.0
If we take 63 away from 82, we end up with 19.
Include the next digit (8) from the dividend after 19, then repeat: 198 / 21

Step 4:
When dividing 198 by 21, we get 9 with a remainder of 9.
Put 9 as the next digit of the answer. 
Result so far: 239.0
The remainder is 9 after subtracting 189 from 198.
Grab the next digit (1) from the dividend, add it to 9, then carry on: 91 / 21

Step 5:
When dividing 91 by 21, we get 4 with a remainder of 7.
Put 4 as the next digit of the answer. 
Result so far: 2394.0
Subtract 84 from 91 to get 7.
Grab the next digit (9) from the dividend, add it to 7, then carry on: 79 / 21

Moving on to step 6:
If we divide 79 by 21, we get 3 and a remainder of 16.
Write down 3 as next digit of the result. 
Result so far: 23943.0
If we subtract 63 from 79, we get 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 7:
21 goes into 160 7 times with a remainder of 13.
Use 7 as the next digit of our solution. 
Result so far: 23943.7
If we take 147 away from 160, we end up with 13.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

Moving on to step 8:
When dividing 130 by 21, we get 6 with a remainder of 4.
The next digit of our result is 6. 
Result so far: 23943.76
If we subtract 126 from 130, 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.

Moving on to step 9:
21 goes into 40 1 times with a remainder of 19.
Put 1 as the next digit of the answer. 
Result so far: 23943.761
Subtracting 21 from 40 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.

Step 10:
21 goes into 190 9 times with a remainder of 1.
Put 9 as the next digit of the answer. 
Result so far: 23943.7619
Subtract 189 from 190 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.

On to step 11:
If we divide 10 by 21, we get 0 and a remainder of 10.
The next digit of our result is 0. 
Result so far: 23943.7619
Subtracting 0 from 10 leaves us 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.

Moving on to step 12:
100 divided by 21 is 4 with a remainder of 16.
Write down 4 as next digit of the result. 
Result so far: 23943.761904
Subtract 84 from 100 to get 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

On to step 13:
21 can be fit into 160 7 times, resulting in a remainder of 13.
Record the quotient 7 as the next digit in the result. 
Result so far: 23943.7619047
Subtract 147 from 160 to get 13.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

Let's proceed to step 14:
21 goes into 130 6 times with a remainder of 4.
Use 6 as the next digit of our solution. 
Result so far: 23943.76190476
Deduct 126 from 130 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.

The final result is 23943.76190476 with a remainder of 4e-09.