787548 divided by 40 
The aim is to understand the frequency of 40 in 787548.

Moving on to step 1:
40 goes into 7 0 times with a remainder of 7.
The next digit of our result is 0. 
Result so far: 0.0
If we subtract 0 from 7, we get 7.
Include the next digit (8) from the dividend after 7, then repeat: 78 / 40

Step 2:
78 divided by 40 is 1 with a remainder of 38.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
The remainder is 38 after subtracting 40 from 78.
Take the next digit (7) from the dividend and append it to 38, then repeat: 387 / 40

Advancing to step 3:
40 can be fit into 387 9 times, resulting in a remainder of 27.
Put 9 as the next digit of the answer. 
Result so far: 19.0
Deduct 360 from 387 and we're left with 27.
Append the next digit (5) from the dividend to 27 and continue with: 275 / 40

Advancing to step 4:
275 divided by 40 is 6 with a remainder of 35.
The number 6 becomes the next digit in our result. 
Result so far: 196.0
Deduct 240 from 275 and we're left with 35.
Include the next digit (4) from the dividend after 35, then repeat: 354 / 40

On to step 5:
When dividing 354 by 40, we get 8 with a remainder of 34.
Use 8 as the next digit of our solution. 
Result so far: 1968.0
The remainder is 34 after subtracting 320 from 354.
Bring next digit (8) of the dividend behind the 34 and repeat the process: 348 / 40

Step 6:
The number 40 fits into 348 8 times, leaving a remainder of 28.
Write down 8 as next digit of the result. 
Result so far: 19688.0
The remainder is 28 after subtracting 320 from 348.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

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

Let's proceed to step 8:
0 divided by 40 is 0 with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 19688.7
If we take 0 away from 0, we end up 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 9:
40 goes into 0 0 times with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 19688.7
The remainder is 0 after subtracting 0 from 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 19688.7, with a leftover of 0.0.