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

Let's proceed to step 1:
The number 40 fits into 8 0 times, leaving a remainder of 8.
The next digit of our result is 0. 
Result so far: 0.0
Subtract 0 from 8 to get 8.
Append the next digit (2) from the dividend to 8 and continue with: 82 / 40

Going ahead to step 2:
When dividing 82 by 40, we get 2 with a remainder of 2.
Put 2 as the next digit of the answer. 
Result so far: 2.0
Subtract 80 from 82 to get 2.
Grab the next digit (7) from the dividend, add it to 2, then carry on: 27 / 40

Going ahead to step 3:
If we divide 27 by 40, we get 0 and a remainder of 27.
The number 0 becomes the next digit in our result. 
Result so far: 20.0
If we subtract 0 from 27, we get 27.
Take the next digit (7) from the dividend and append it to 27, then repeat: 277 / 40

Step 4:
The number 40 fits into 277 6 times, leaving a remainder of 37.
Write down 6 as next digit of the result. 
Result so far: 206.0
If we subtract 240 from 277, we get 37.
Bring next digit (8) of the dividend behind the 37 and repeat the process: 378 / 40

Let's proceed to step 5:
40 goes into 378 9 times with a remainder of 18.
The next digit of our result is 9. 
Result so far: 2069.0
Subtracting 360 from 378 leaves us with 18.
Append the next digit (2) from the dividend to 18 and continue with: 182 / 40

On to step 6:
If we divide 182 by 40, we get 4 and a remainder of 22.
Write down 4 as next digit of the result. 
Result so far: 20694.0
If we take 160 away from 182, we end up with 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

Going ahead to step 7:
If we divide 220 by 40, we get 5 and a remainder of 20.
Put 5 as the next digit of the answer. 
Result so far: 20694.5
Subtract 200 from 220 to get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

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

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