We look at the division of 40795621 by 40 
The aim is to understand the frequency of 40 in 40795621.

Step 1:
40 can be fit into 4 0 times, resulting in a remainder of 4.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we subtract 0 from 4, we get 4.
Include the next digit (0) from the dividend after 4, then repeat: 40 / 40

Going ahead to step 2:
The number 40 fits into 40 1 times, leaving a remainder of 0.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
The remainder is 0 after subtracting 40 from 40.
Include the next digit (7) from the dividend after 0, then repeat: 7 / 40

Going ahead to step 3:
If we divide 7 by 40, we get 0 and a remainder of 7.
Use 0 as the next digit of our solution. 
Result so far: 10.0
Subtract 0 from 7 to get 7.
Fetch the next digit (9) from the dividend, attach it to 7 and continue: 79 / 40

Step 4:
79 divided by 40 is 1 with a remainder of 39.
The number 1 becomes the next digit in our result. 
Result so far: 101.0
The remainder is 39 after subtracting 40 from 79.
Include the next digit (5) from the dividend after 39, then repeat: 395 / 40

Step 5:
If we divide 395 by 40, we get 9 and a remainder of 35.
Write down 9 as next digit of the result. 
Result so far: 1019.0
If we take 360 away from 395, we end up with 35.
Fetch the next digit (6) from the dividend, attach it to 35 and continue: 356 / 40

Advancing to step 6:
If we divide 356 by 40, we get 8 and a remainder of 36.
The next digit of our result is 8. 
Result so far: 10198.0
If we subtract 320 from 356, we get 36.
Bring next digit (2) of the dividend behind the 36 and repeat the process: 362 / 40

Step 7:
40 can be fit into 362 9 times, resulting in a remainder of 2.
Record the quotient 9 as the next digit in the result. 
Result so far: 101989.0
If we subtract 360 from 362, we get 2.
Grab the next digit (1) from the dividend, add it to 2, then carry on: 21 / 40

Step 8:
The number 40 fits into 21 0 times, leaving a remainder of 21.
The number 0 becomes the next digit in our result. 
Result so far: 1019890.0
If we subtract 0 from 21, we get 21.
Since there are no more digits in the dividend, we add a zero to the remainder making it 210, and continue the process.

Let's proceed to step 9:
40 can be fit into 210 5 times, resulting in a remainder of 10.
Record the quotient 5 as the next digit in the result. 
Result so far: 1019890.5
Subtract 200 from 210 to 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.

On to step 10:
40 can be fit into 100 2 times, resulting in a remainder of 20.
Put 2 as the next digit of the answer. 
Result so far: 1019890.52
If we subtract 80 from 100, we 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.

Going ahead to step 11:
The number 40 fits into 200 5 times, leaving a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 1019890.525
Subtract 200 from 200 to 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.

Step 12:
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: 1019890.525
If we subtract 0 from 0, 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.

Let's proceed to step 13:
If we divide 0 by 40, we get 0 and a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 1019890.525
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.

In conclusion, the division gives 1019890.525 with a balance of 0.0.