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

Step 1:
The number 40 fits into 8 0 times, leaving a remainder of 8.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we subtract 0 from 8, we get 8.
Bring next digit (4) of the dividend behind the 8 and repeat the process: 84 / 40

Step 2:
84 divided by 40 is 2 with a remainder of 4.
Put 2 as the next digit of the answer. 
Result so far: 2.0
If we subtract 80 from 84, we get 4.
Fetch the next digit (2) from the dividend, attach it to 4 and continue: 42 / 40

Step 3:
If we divide 42 by 40, we get 1 and a remainder of 2.
Use 1 as the next digit of our solution. 
Result so far: 21.0
Deduct 40 from 42 and we're left with 2.
Append the next digit (5) from the dividend to 2 and continue with: 25 / 40

Moving on to step 4:
40 can be fit into 25 0 times, resulting in a remainder of 25.
Use 0 as the next digit of our solution. 
Result so far: 210.0
If we subtract 0 from 25, we get 25.
Append the next digit (4) from the dividend to 25 and continue with: 254 / 40

Let's proceed to step 5:
254 divided by 40 is 6 with a remainder of 14.
Put 6 as the next digit of the answer. 
Result so far: 2106.0
The remainder is 14 after subtracting 240 from 254.
Include the next digit (4) from the dividend after 14, then repeat: 144 / 40

Step 6:
144 divided by 40 is 3 with a remainder of 24.
Put 3 as the next digit of the answer. 
Result so far: 21063.0
The remainder is 24 after subtracting 120 from 144.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Advancing to step 7:
40 can be fit into 240 6 times, resulting in a remainder of 0.
Use 6 as the next digit of our solution. 
Result so far: 21063.6
If we take 240 away from 240, 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.

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

Going ahead to step 9:
40 goes into 0 0 times with a remainder of 0.
The next digit of our result is 0. 
Result so far: 21063.6
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.

The quotient of the division is 21063.6, and the remainder is 0.0.