We're dividing 512117 by 21 
The aim is to understand the frequency of 21 in 512117.

On to step 1:
5 divided by 21 is 0 with a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Take the next digit (1) from the dividend and append it to 5, then repeat: 51 / 21

Advancing to step 2:
If we divide 51 by 21, we get 2 and a remainder of 9.
Write down 2 as next digit of the result. 
Result so far: 2.0
The remainder is 9 after subtracting 42 from 51.
Include the next digit (2) from the dividend after 9, then repeat: 92 / 21

Going ahead to step 3:
92 divided by 21 is 4 with a remainder of 8.
The next digit of our result is 4. 
Result so far: 24.0
Subtracting 84 from 92 leaves us with 8.
Fetch the next digit (1) from the dividend, attach it to 8 and continue: 81 / 21

Advancing to step 4:
When dividing 81 by 21, we get 3 with a remainder of 18.
Use 3 as the next digit of our solution. 
Result so far: 243.0
Subtract 63 from 81 to get 18.
Fetch the next digit (1) from the dividend, attach it to 18 and continue: 181 / 21

Step 5:
The number 21 fits into 181 8 times, leaving a remainder of 13.
Record the quotient 8 as the next digit in the result. 
Result so far: 2438.0
The remainder is 13 after subtracting 168 from 181.
Fetch the next digit (7) from the dividend, attach it to 13 and continue: 137 / 21

Going ahead to step 6:
21 can be fit into 137 6 times, resulting in a remainder of 11.
The next digit of our result is 6. 
Result so far: 24386.0
The remainder is 11 after subtracting 126 from 137.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Moving on to step 7:
If we divide 110 by 21, we get 5 and a remainder of 5.
Use 5 as the next digit of our solution. 
Result so far: 24386.5
Deduct 105 from 110 and we're left with 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Let's proceed to step 8:
21 can be fit into 50 2 times, resulting in a remainder of 8.
Use 2 as the next digit of our solution. 
Result so far: 24386.52
The remainder is 8 after subtracting 42 from 50.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Advancing to step 9:
21 can be fit into 80 3 times, resulting in a remainder of 17.
The number 3 becomes the next digit in our result. 
Result so far: 24386.523
Deduct 63 from 80 and we're left with 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Moving on to step 10:
The number 21 fits into 170 8 times, leaving a remainder of 2.
The next digit of our result is 8. 
Result so far: 24386.5238
Subtract 168 from 170 to get 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Advancing to step 11:
When dividing 20 by 21, we get 0 with a remainder of 20.
Use 0 as the next digit of our solution. 
Result so far: 24386.5238
If we subtract 0 from 20, we get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Step 12:
If we divide 200 by 21, we get 9 and a remainder of 11.
Write down 9 as next digit of the result. 
Result so far: 24386.523809
The remainder is 11 after subtracting 189 from 200.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Moving on to step 13:
The number 21 fits into 110 5 times, leaving a remainder of 5.
Put 5 as the next digit of the answer. 
Result so far: 24386.5238095
If we subtract 105 from 110, we get 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Going ahead to step 14:
The number 21 fits into 50 2 times, leaving a remainder of 8.
The next digit of our result is 2. 
Result so far: 24386.52380952
If we take 42 away from 50, we end up with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Our division results in 24386.52380952 with a remaining 8e-09.