We're dividing 13017 by 40 
The aim is to understand the frequency of 40 in 13017.

Let's proceed to step 1:
If we divide 1 by 40, we get 0 and a remainder of 1.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we take 0 away from 1, we end up with 1.
Fetch the next digit (3) from the dividend, attach it to 1 and continue: 13 / 40

Step 2:
If we divide 13 by 40, we get 0 and a remainder of 13.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Deduct 0 from 13 and we're left with 13.
Take the next digit (0) from the dividend and append it to 13, then repeat: 130 / 40

Going ahead to step 3:
When dividing 130 by 40, we get 3 with a remainder of 10.
Record the quotient 3 as the next digit in the result. 
Result so far: 3.0
Deduct 120 from 130 and we're left with 10.
Append the next digit (1) from the dividend to 10 and continue with: 101 / 40

Step 4:
40 goes into 101 2 times with a remainder of 21.
Record the quotient 2 as the next digit in the result. 
Result so far: 32.0
The remainder is 21 after subtracting 80 from 101.
Append the next digit (7) from the dividend to 21 and continue with: 217 / 40

Let's proceed to step 5:
When dividing 217 by 40, we get 5 with a remainder of 17.
Record the quotient 5 as the next digit in the result. 
Result so far: 325.0
Subtracting 200 from 217 leaves us 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.

On to step 6:
If we divide 170 by 40, we get 4 and a remainder of 10.
The number 4 becomes the next digit in our result. 
Result so far: 325.4
If we subtract 160 from 170, we get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Let's proceed to step 7:
The number 40 fits into 100 2 times, leaving a remainder of 20.
Use 2 as the next digit of our solution. 
Result so far: 325.42
Subtracting 80 from 100 leaves us with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Advancing to step 8:
The number 40 fits into 200 5 times, leaving a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 325.425
Subtract 200 from 200 to get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Advancing to step 9:
When dividing 0 by 40, we get 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 325.425
Deduct 0 from 0 and we're left with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Advancing to step 10:
0 divided by 40 is 0 with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 325.425
Subtract 0 from 0 to get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Our division results in 325.425 with a remaining 0.0.