We divide 531785 by 40
The aim is to understand the frequency of 40 in 531785.

Let's proceed 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 take 0 away from 5, we end up with 5.
Take the next digit (3) from the dividend and append it to 5, then repeat: 53 / 40

On to step 2:
53 divided by 40 is 1 with a remainder of 13.
Write down 1 as next digit of the result. 
Result so far: 1.0
Subtracting 40 from 53 leaves us with 13.
Grab the next digit (1) from the dividend, add it to 13, then carry on: 131 / 40

Moving on to step 3:
131 divided by 40 is 3 with a remainder of 11.
The number 3 becomes the next digit in our result. 
Result so far: 13.0
The remainder is 11 after subtracting 120 from 131.
Bring next digit (7) of the dividend behind the 11 and repeat the process: 117 / 40

Going ahead to step 4:
40 can be fit into 117 2 times, resulting in a remainder of 37.
Record the quotient 2 as the next digit in the result. 
Result so far: 132.0
If we take 80 away from 117, we end up with 37.
Append the next digit (8) from the dividend to 37 and continue with: 378 / 40

On to step 5:
40 can be fit into 378 9 times, resulting in a remainder of 18.
Write down 9 as next digit of the result. 
Result so far: 1329.0
Subtract 360 from 378 to get 18.
Grab the next digit (5) from the dividend, add it to 18, then carry on: 185 / 40

Let's proceed to step 6:
If we divide 185 by 40, we get 4 and a remainder of 25.
Write down 4 as next digit of the result. 
Result so far: 13294.0
Subtract 160 from 185 to get 25.
Since there are no more digits in the dividend, we add a zero to the remainder making it 250, and continue the process.

On to step 7:
40 can be fit into 250 6 times, resulting in a remainder of 10.
Record the quotient 6 as the next digit in the result. 
Result so far: 13294.6
If we take 240 away from 250, we end up with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

On to step 8:
40 goes into 100 2 times with a remainder of 20.
The next digit of our result is 2. 
Result so far: 13294.62
Deduct 80 from 100 and we're left 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.

Let's proceed to step 9:
200 divided by 40 is 5 with a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 13294.625
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.

Let's proceed to step 10:
The number 40 fits into 0 0 times, leaving a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 13294.625
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.

Let's proceed to step 11:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 13294.625
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.

Our division results in 13294.625 with a remaining 0.0.