Let's divide 559916 by 40
The aim is to understand the frequency of 40 in 559916.

Let's proceed to step 1:
40 goes into 5 0 times with a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 5 after subtracting 0 from 5.
Bring next digit (5) of the dividend behind the 5 and repeat the process: 55 / 40

On to step 2:
When dividing 55 by 40, we get 1 with a remainder of 15.
Write down 1 as next digit of the result. 
Result so far: 1.0
Deduct 40 from 55 and we're left with 15.
Fetch the next digit (9) from the dividend, attach it to 15 and continue: 159 / 40

Let's proceed to step 3:
40 goes into 159 3 times with a remainder of 39.
Write down 3 as next digit of the result. 
Result so far: 13.0
The remainder is 39 after subtracting 120 from 159.
Take the next digit (9) from the dividend and append it to 39, then repeat: 399 / 40

Step 4:
If we divide 399 by 40, we get 9 and a remainder of 39.
Record the quotient 9 as the next digit in the result. 
Result so far: 139.0
Subtract 360 from 399 to get 39.
Grab the next digit (1) from the dividend, add it to 39, then carry on: 391 / 40

Advancing to step 5:
The number 40 fits into 391 9 times, leaving a remainder of 31.
Put 9 as the next digit of the answer. 
Result so far: 1399.0
Deduct 360 from 391 and we're left with 31.
Fetch the next digit (6) from the dividend, attach it to 31 and continue: 316 / 40

On to step 6:
316 divided by 40 is 7 with a remainder of 36.
Use 7 as the next digit of our solution. 
Result so far: 13997.0
Deduct 280 from 316 and we're left with 36.
Since there are no more digits in the dividend, we add a zero to the remainder making it 360, and continue the process.

Let's proceed to step 7:
When dividing 360 by 40, we get 9 with a remainder of 0.
The number 9 becomes the next digit in our result. 
Result so far: 13997.9
If we subtract 360 from 360, 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.

Moving on to step 8:
40 goes into 0 0 times with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 13997.9
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.

On to step 9:
40 goes into 0 0 times with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 13997.9
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.

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