We're dividing 542829 by 40 
The aim is to understand the frequency of 40 in 542829.

Going ahead to step 1:
When dividing 5 by 40, we get 0 with a remainder of 5.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Append the next digit (4) from the dividend to 5 and continue with: 54 / 40

Moving on to step 2:
54 divided by 40 is 1 with a remainder of 14.
Write down 1 as next digit of the result. 
Result so far: 1.0
Subtract 40 from 54 to get 14.
Append the next digit (2) from the dividend to 14 and continue with: 142 / 40

Moving on to step 3:
142 divided by 40 is 3 with a remainder of 22.
Put 3 as the next digit of the answer. 
Result so far: 13.0
Deduct 120 from 142 and we're left with 22.
Fetch the next digit (8) from the dividend, attach it to 22 and continue: 228 / 40

Moving on to step 4:
228 divided by 40 is 5 with a remainder of 28.
Put 5 as the next digit of the answer. 
Result so far: 135.0
The remainder is 28 after subtracting 200 from 228.
Include the next digit (2) from the dividend after 28, then repeat: 282 / 40

Moving on to step 5:
The number 40 fits into 282 7 times, leaving a remainder of 2.
The next digit of our result is 7. 
Result so far: 1357.0
The remainder is 2 after subtracting 280 from 282.
Fetch the next digit (9) from the dividend, attach it to 2 and continue: 29 / 40

Advancing to step 6:
29 divided by 40 is 0 with a remainder of 29.
Record the quotient 0 as the next digit in the result. 
Result so far: 13570.0
Subtract 0 from 29 to get 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 290, and continue the process.

Advancing to step 7:
40 goes into 290 7 times with a remainder of 10.
Record the quotient 7 as the next digit in the result. 
Result so far: 13570.7
If we subtract 280 from 290, we get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Going ahead to step 8:
When dividing 100 by 40, we get 2 with a remainder of 20.
Use 2 as the next digit of our solution. 
Result so far: 13570.72
Subtracting 80 from 100 leaves us 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.

Step 9:
The number 40 fits into 200 5 times, leaving a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 13570.725
The remainder is 0 after subtracting 200 from 200.
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 10:
40 can be fit into 0 0 times, resulting in a remainder of 0.
The next digit of our result is 0. 
Result so far: 13570.725
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.

Going ahead to step 11:
If we divide 0 by 40, we get 0 and a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 13570.725
Subtracting 0 from 0 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.

Our division results in 13570.725 with a remaining 0.0.