We look at the division of 20417 by 18 
The aim is to understand the frequency of 18 in 20417.

Let's proceed to step 1:
2 divided by 18 is 0 with a remainder of 2.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Deduct 0 from 2 and we're left with 2.
Append the next digit (0) from the dividend to 2 and continue with: 20 / 18

Moving on to step 2:
20 divided by 18 is 1 with a remainder of 2.
The next digit of our result is 1. 
Result so far: 1.0
Subtract 18 from 20 to get 2.
Grab the next digit (4) from the dividend, add it to 2, then carry on: 24 / 18

Step 3:
18 can be fit into 24 1 times, resulting in a remainder of 6.
The number 1 becomes the next digit in our result. 
Result so far: 11.0
Deduct 18 from 24 and we're left with 6.
Append the next digit (1) from the dividend to 6 and continue with: 61 / 18

Step 4:
When dividing 61 by 18, we get 3 with a remainder of 7.
Record the quotient 3 as the next digit in the result. 
Result so far: 113.0
Deduct 54 from 61 and we're left with 7.
Include the next digit (7) from the dividend after 7, then repeat: 77 / 18

On to step 5:
If we divide 77 by 18, we get 4 and a remainder of 5.
The next digit of our result is 4. 
Result so far: 1134.0
Subtracting 72 from 77 leaves us 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.

Going ahead to step 6:
When dividing 50 by 18, we get 2 with a remainder of 14.
The next digit of our result is 2. 
Result so far: 1134.2
Subtracting 36 from 50 leaves us with 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

Going ahead to step 7:
18 can be fit into 140 7 times, resulting in a remainder of 14.
Record the quotient 7 as the next digit in the result. 
Result so far: 1134.27
The remainder is 14 after subtracting 126 from 140.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

Going ahead to step 8:
When dividing 140 by 18, we get 7 with a remainder of 14.
Put 7 as the next digit of the answer. 
Result so far: 1134.277
Subtract 126 from 140 to get 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

After the division, we end up with 1134.277 and a remainder of 0.0014.