We look at the division of 166559 by 13 
The aim is to understand the frequency of 13 in 166559.

Let's proceed to step 1:
13 goes into 1 0 times with a remainder of 1.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtracting 0 from 1 leaves us with 1.
Append the next digit (6) from the dividend to 1 and continue with: 16 / 13

Let's proceed to step 2:
When dividing 16 by 13, we get 1 with a remainder of 3.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
If we take 13 away from 16, we end up with 3.
Grab the next digit (6) from the dividend, add it to 3, then carry on: 36 / 13

Let's proceed to step 3:
When dividing 36 by 13, we get 2 with a remainder of 10.
Use 2 as the next digit of our solution. 
Result so far: 12.0
If we subtract 26 from 36, we get 10.
Append the next digit (5) from the dividend to 10 and continue with: 105 / 13

Moving on to step 4:
13 goes into 105 8 times with a remainder of 1.
Put 8 as the next digit of the answer. 
Result so far: 128.0
If we subtract 104 from 105, we get 1.
Include the next digit (5) from the dividend after 1, then repeat: 15 / 13

Advancing to step 5:
If we divide 15 by 13, we get 1 and a remainder of 2.
Write down 1 as next digit of the result. 
Result so far: 1281.0
If we take 13 away from 15, we end up with 2.
Fetch the next digit (9) from the dividend, attach it to 2 and continue: 29 / 13

Let's proceed to step 6:
29 divided by 13 is 2 with a remainder of 3.
Record the quotient 2 as the next digit in the result. 
Result so far: 12812.0
The remainder is 3 after subtracting 26 from 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

On to step 7:
If we divide 30 by 13, we get 2 and a remainder of 4.
The number 2 becomes the next digit in our result. 
Result so far: 12812.2
The remainder is 4 after subtracting 26 from 30.
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 8:
If we divide 40 by 13, we get 3 and a remainder of 1.
Write down 3 as next digit of the result. 
Result so far: 12812.23
If we take 39 away from 40, 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.

Going ahead to step 9:
10 divided by 13 is 0 with a remainder of 10.
Use 0 as the next digit of our solution. 
Result so far: 12812.23
Deduct 0 from 10 and we're left 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 10:
When dividing 100 by 13, we get 7 with a remainder of 9.
Write down 7 as next digit of the result. 
Result so far: 12812.2307
Subtracting 91 from 100 leaves us 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.

On to step 11:
When dividing 90 by 13, we get 6 with a remainder of 12.
Use 6 as the next digit of our solution. 
Result so far: 12812.23076
If we subtract 78 from 90, we get 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Moving on to step 12:
120 divided by 13 is 9 with a remainder of 3.
Use 9 as the next digit of our solution. 
Result so far: 12812.230769
Subtract 117 from 120 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.

Step 13:
30 divided by 13 is 2 with a remainder of 4.
Put 2 as the next digit of the answer. 
Result so far: 12812.2307692
If we subtract 26 from 30, 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 14:
When dividing 40 by 13, we get 3 with a remainder of 1.
Record the quotient 3 as the next digit in the result. 
Result so far: 12812.23076923
Deduct 39 from 40 and we're left 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.

The quotient of the division is 12812.23076923, and the remainder is 1e-09.