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

Step 1:
The number 40 fits into 5 0 times, leaving a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
Deduct 0 from 5 and we're left with 5.
Append the next digit (1) from the dividend to 5 and continue with: 51 / 40

Advancing to step 2:
51 divided by 40 is 1 with a remainder of 11.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
If we take 40 away from 51, we end up with 11.
Fetch the next digit (8) from the dividend, attach it to 11 and continue: 118 / 40

Let's proceed to step 3:
The number 40 fits into 118 2 times, leaving a remainder of 38.
Record the quotient 2 as the next digit in the result. 
Result so far: 12.0
Subtracting 80 from 118 leaves us with 38.
Append the next digit (7) from the dividend to 38 and continue with: 387 / 40

Let's proceed to step 4:
40 can be fit into 387 9 times, resulting in a remainder of 27.
Use 9 as the next digit of our solution. 
Result so far: 129.0
The remainder is 27 after subtracting 360 from 387.
Bring next digit (3) of the dividend behind the 27 and repeat the process: 273 / 40

Moving on to step 5:
273 divided by 40 is 6 with a remainder of 33.
Put 6 as the next digit of the answer. 
Result so far: 1296.0
If we take 240 away from 273, we end up with 33.
Grab the next digit (9) from the dividend, add it to 33, then carry on: 339 / 40

On to step 6:
The number 40 fits into 339 8 times, leaving a remainder of 19.
Write down 8 as next digit of the result. 
Result so far: 12968.0
Deduct 320 from 339 and we're left with 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

Going ahead to step 7:
40 goes into 190 4 times with a remainder of 30.
Put 4 as the next digit of the answer. 
Result so far: 12968.4
Subtracting 160 from 190 leaves us with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Advancing to step 8:
The number 40 fits into 300 7 times, leaving a remainder of 20.
Write down 7 as next digit of the result. 
Result so far: 12968.47
Subtract 280 from 300 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 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: 12968.475
If we subtract 200 from 200, 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 10:
40 can be fit into 0 0 times, resulting in a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 12968.475
If we take 0 away from 0, 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.

Let's proceed to step 11:
When dividing 0 by 40, we get 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 12968.475
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 final result is 12968.475 with a remainder of 0.0.