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

Moving on to step 1:
If we divide 5 by 40, we get 0 and a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Take the next digit (1) from the dividend and append it to 5, then repeat: 51 / 40

On to step 2:
40 goes into 51 1 times with a remainder of 11.
Use 1 as the next digit of our solution. 
Result so far: 1.0
The remainder is 11 after subtracting 40 from 51.
Append the next digit (7) from the dividend to 11 and continue with: 117 / 40

Let's proceed to step 3:
The number 40 fits into 117 2 times, leaving a remainder of 37.
The number 2 becomes the next digit in our result. 
Result so far: 12.0
If we subtract 80 from 117, we get 37.
Fetch the next digit (8) from the dividend, attach it to 37 and continue: 378 / 40

Step 4:
The number 40 fits into 378 9 times, leaving a remainder of 18.
Write down 9 as next digit of the result. 
Result so far: 129.0
Subtract 360 from 378 to get 18.
Fetch the next digit (3) from the dividend, attach it to 18 and continue: 183 / 40

Step 5:
If we divide 183 by 40, we get 4 and a remainder of 23.
The number 4 becomes the next digit in our result. 
Result so far: 1294.0
Deduct 160 from 183 and we're left with 23.
Append the next digit (5) from the dividend to 23 and continue with: 235 / 40

Let's proceed to step 6:
If we divide 235 by 40, we get 5 and a remainder of 35.
Record the quotient 5 as the next digit in the result. 
Result so far: 12945.0
Deduct 200 from 235 and we're left with 35.
Since there are no more digits in the dividend, we add a zero to the remainder making it 350, and continue the process.

Moving on to step 7:
40 can be fit into 350 8 times, resulting in a remainder of 30.
The next digit of our result is 8. 
Result so far: 12945.8
The remainder is 30 after subtracting 320 from 350.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Step 8:
40 can be fit into 300 7 times, resulting in a remainder of 20.
The next digit of our result is 7. 
Result so far: 12945.87
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.

Moving on to step 9:
The number 40 fits into 200 5 times, leaving a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 12945.875
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.

Moving on to step 10:
40 goes into 0 0 times with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 12945.875
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 11:
When dividing 0 by 40, we get 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 12945.875
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.

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