We look at the division of 705171 by 40 
The aim is to understand the frequency of 40 in 705171.

Let's proceed to step 1:
40 goes into 7 0 times with a remainder of 7.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
The remainder is 7 after subtracting 0 from 7.
Grab the next digit (0) from the dividend, add it to 7, then carry on: 70 / 40

Advancing to step 2:
70 divided by 40 is 1 with a remainder of 30.
Write down 1 as next digit of the result. 
Result so far: 1.0
Subtracting 40 from 70 leaves us with 30.
Grab the next digit (5) from the dividend, add it to 30, then carry on: 305 / 40

On to step 3:
If we divide 305 by 40, we get 7 and a remainder of 25.
Write down 7 as next digit of the result. 
Result so far: 17.0
If we subtract 280 from 305, we get 25.
Fetch the next digit (1) from the dividend, attach it to 25 and continue: 251 / 40

Moving on to step 4:
251 divided by 40 is 6 with a remainder of 11.
Write down 6 as next digit of the result. 
Result so far: 176.0
Subtracting 240 from 251 leaves us with 11.
Include the next digit (7) from the dividend after 11, then repeat: 117 / 40

On to step 5:
If we divide 117 by 40, we get 2 and a remainder of 37.
Record the quotient 2 as the next digit in the result. 
Result so far: 1762.0
Deduct 80 from 117 and we're left with 37.
Take the next digit (1) from the dividend and append it to 37, then repeat: 371 / 40

Step 6:
40 goes into 371 9 times with a remainder of 11.
Put 9 as the next digit of the answer. 
Result so far: 17629.0
Deduct 360 from 371 and we're left with 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Step 7:
110 divided by 40 is 2 with a remainder of 30.
The number 2 becomes the next digit in our result. 
Result so far: 17629.2
Subtract 80 from 110 to get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Step 8:
300 divided by 40 is 7 with a remainder of 20.
Write down 7 as next digit of the result. 
Result so far: 17629.27
Deduct 280 from 300 and we're left 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.

Going ahead to step 9:
40 goes into 200 5 times with a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 17629.275
Subtracting 200 from 200 leaves us 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.

On to step 10:
When dividing 0 by 40, we get 0 with a remainder of 0.
The next digit of our result is 0. 
Result so far: 17629.275
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.

Step 11:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 17629.275
Subtracting 0 from 0 leaves us 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.

The final outcome is 17629.275, with a leftover of 0.0.