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

On to step 1:
If we divide 8 by 40, we get 0 and a remainder of 8.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Deduct 0 from 8 and we're left with 8.
Include the next digit (5) from the dividend after 8, then repeat: 85 / 40

On to step 2:
If we divide 85 by 40, we get 2 and a remainder of 5.
Write down 2 as next digit of the result. 
Result so far: 2.0
Deduct 80 from 85 and we're left with 5.
Grab the next digit (5) from the dividend, add it to 5, then carry on: 55 / 40

Let's proceed to step 3:
The number 40 fits into 55 1 times, leaving a remainder of 15.
Use 1 as the next digit of our solution. 
Result so far: 21.0
If we take 40 away from 55, we end up with 15.
Append the next digit (9) from the dividend to 15 and continue with: 159 / 40

Advancing to step 4:
If we divide 159 by 40, we get 3 and a remainder of 39.
Use 3 as the next digit of our solution. 
Result so far: 213.0
If we subtract 120 from 159, we get 39.
Include the next digit (4) from the dividend after 39, then repeat: 394 / 40

Going ahead to step 5:
If we divide 394 by 40, we get 9 and a remainder of 34.
Put 9 as the next digit of the answer. 
Result so far: 2139.0
Subtract 360 from 394 to get 34.
Include the next digit (2) from the dividend after 34, then repeat: 342 / 40

Step 6:
When dividing 342 by 40, we get 8 with a remainder of 22.
Put 8 as the next digit of the answer. 
Result so far: 21398.0
Subtract 320 from 342 to get 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

On to step 7:
40 can be fit into 220 5 times, resulting in a remainder of 20.
The number 5 becomes the next digit in our result. 
Result so far: 21398.5
If we take 200 away from 220, we end up 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:
When dividing 200 by 40, we get 5 with a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 21398.55
If we take 200 away from 200, 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.

The final result is 21398.55 with a remainder of 0.0.