Let's divide 505038 by 21
The aim is to understand the frequency of 21 in 505038.

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
The remainder is 5 after subtracting 0 from 5.
Grab the next digit (0) from the dividend, add it to 5, then carry on: 50 / 21

Going ahead to step 2:
50 divided by 21 is 2 with a remainder of 8.
Record the quotient 2 as the next digit in the result. 
Result so far: 2.0
Subtract 42 from 50 to get 8.
Fetch the next digit (5) from the dividend, attach it to 8 and continue: 85 / 21

On to step 3:
85 divided by 21 is 4 with a remainder of 1.
Put 4 as the next digit of the answer. 
Result so far: 24.0
If we subtract 84 from 85, we get 1.
Bring next digit (0) of the dividend behind the 1 and repeat the process: 10 / 21

Moving on to step 4:
21 goes into 10 0 times with a remainder of 10.
The next digit of our result is 0. 
Result so far: 240.0
Subtracting 0 from 10 leaves us with 10.
Fetch the next digit (3) from the dividend, attach it to 10 and continue: 103 / 21

Moving on to step 5:
When dividing 103 by 21, we get 4 with a remainder of 19.
The next digit of our result is 4. 
Result so far: 2404.0
Subtracting 84 from 103 leaves us with 19.
Append the next digit (8) from the dividend to 19 and continue with: 198 / 21

On to step 6:
21 can be fit into 198 9 times, resulting in a remainder of 9.
The number 9 becomes the next digit in our result. 
Result so far: 24049.0
Subtract 189 from 198 to get 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 goes into 90 4 times with a remainder of 6.
Write down 4 as next digit of the result. 
Result so far: 24049.4
The remainder is 6 after subtracting 84 from 90.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Going ahead to step 8:
21 goes into 60 2 times with a remainder of 18.
Use 2 as the next digit of our solution. 
Result so far: 24049.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.
Record the quotient 8 as the next digit in the result. 
Result so far: 24049.428
If we take 168 away from 180, we end up with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Step 10:
If we divide 120 by 21, we get 5 and a remainder of 15.
The next digit of our result is 5. 
Result so far: 24049.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.

Going ahead to step 11:
21 can be fit into 150 7 times, resulting in a remainder of 3.
The number 7 becomes the next digit in our result. 
Result so far: 24049.42857
Subtract 147 from 150 to get 3.
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:
21 goes into 30 1 times with a remainder of 9.
Use 1 as the next digit of our solution. 
Result so far: 24049.428571
Deduct 21 from 30 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.

Let's proceed to step 13:
21 goes into 90 4 times with a remainder of 6.
The next digit of our result is 4. 
Result so far: 24049.4285714
The remainder is 6 after subtracting 84 from 90.
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:
21 can be fit into 60 2 times, resulting in a remainder of 18.
Write down 2 as next digit of the result. 
Result so far: 24049.42857142
If we subtract 42 from 60, we get 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

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