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

On to step 1:
If we divide 3 by 21, we get 0 and a remainder of 3.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 3 leaves us with 3.
Bring next digit (1) of the dividend behind the 3 and repeat the process: 31 / 21

Going ahead to step 2:
If we divide 31 by 21, we get 1 and a remainder of 10.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Subtract 21 from 31 to get 10.
Take the next digit (7) from the dividend and append it to 10, then repeat: 107 / 21

Going ahead to step 3:
21 goes into 107 5 times with a remainder of 2.
Use 5 as the next digit of our solution. 
Result so far: 15.0
If we take 105 away from 107, we end up with 2.
Include the next digit (4) from the dividend after 2, then repeat: 24 / 21

Going ahead to step 4:
21 can be fit into 24 1 times, resulting in a remainder of 3.
Record the quotient 1 as the next digit in the result. 
Result so far: 151.0
If we take 21 away from 24, we end up with 3.
Take the next digit (5) from the dividend and append it to 3, then repeat: 35 / 21

Going ahead to step 5:
35 divided by 21 is 1 with a remainder of 14.
Use 1 as the next digit of our solution. 
Result so far: 1511.0
If we subtract 21 from 35, we get 14.
Append the next digit (8) from the dividend to 14 and continue with: 148 / 21

Advancing to step 6:
If we divide 148 by 21, we get 7 and a remainder of 1.
Record the quotient 7 as the next digit in the result. 
Result so far: 15117.0
If we take 147 away from 148, we end up with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Moving on to step 7:
The number 21 fits into 10 0 times, leaving a remainder of 10.
Record the quotient 0 as the next digit in the result. 
Result so far: 15117.0
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.

Going ahead to step 8:
The number 21 fits into 100 4 times, leaving a remainder of 16.
Write down 4 as next digit of the result. 
Result so far: 15117.04
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 9:
21 can be fit into 160 7 times, resulting in a remainder of 13.
Put 7 as the next digit of the answer. 
Result so far: 15117.047
Subtracting 147 from 160 leaves us 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.

Advancing to step 10:
The number 21 fits into 130 6 times, leaving a remainder of 4.
The number 6 becomes the next digit in our result. 
Result so far: 15117.0476
Subtract 126 from 130 to 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.

Advancing to step 11:
When dividing 40 by 21, we get 1 with a remainder of 19.
Record the quotient 1 as the next digit in the result. 
Result so far: 15117.04761
Deduct 21 from 40 and we're left 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.

On to step 12:
190 divided by 21 is 9 with a remainder of 1.
Record the quotient 9 as the next digit in the result. 
Result so far: 15117.047619
The remainder is 1 after subtracting 189 from 190.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Let's proceed to step 13:
21 goes into 10 0 times with a remainder of 10.
Put 0 as the next digit of the answer. 
Result so far: 15117.047619
If we take 0 away from 10, we end up 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.

Advancing to step 14:
If we divide 100 by 21, we get 4 and a remainder of 16.
Record the quotient 4 as the next digit in the result. 
Result so far: 15117.04761904
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.

The final outcome is 15117.04761904, with a leftover of 1.6e-08.