687012 ÷ 40 
The aim is to understand the frequency of 40 in 687012.

Advancing to step 1:
When dividing 6 by 40, we get 0 with a remainder of 6.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtracting 0 from 6 leaves us with 6.
Take the next digit (8) from the dividend and append it to 6, then repeat: 68 / 40

On to step 2:
40 goes into 68 1 times with a remainder of 28.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
If we subtract 40 from 68, we get 28.
Include the next digit (7) from the dividend after 28, then repeat: 287 / 40

Let's proceed to step 3:
If we divide 287 by 40, we get 7 and a remainder of 7.
Record the quotient 7 as the next digit in the result. 
Result so far: 17.0
Deduct 280 from 287 and we're left with 7.
Take the next digit (0) from the dividend and append it to 7, then repeat: 70 / 40

Step 4:
If we divide 70 by 40, we get 1 and a remainder of 30.
Write down 1 as next digit of the result. 
Result so far: 171.0
Subtract 40 from 70 to get 30.
Bring next digit (1) of the dividend behind the 30 and repeat the process: 301 / 40

Let's proceed to step 5:
The number 40 fits into 301 7 times, leaving a remainder of 21.
Use 7 as the next digit of our solution. 
Result so far: 1717.0
Deduct 280 from 301 and we're left with 21.
Append the next digit (2) from the dividend to 21 and continue with: 212 / 40

On to step 6:
40 goes into 212 5 times with a remainder of 12.
The number 5 becomes the next digit in our result. 
Result so far: 17175.0
If we take 200 away from 212, we end up with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Step 7:
When dividing 120 by 40, we get 3 with a remainder of 0.
Put 3 as the next digit of the answer. 
Result so far: 17175.3
If we subtract 120 from 120, we 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.

Moving on to step 8:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 17175.3
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.

Moving on to step 9:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 17175.3
If we subtract 0 from 0, we 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.

After the division, we end up with 17175.3 and a remainder of 0.0.