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

Moving on to step 1:
When dividing 7 by 40, we get 0 with a remainder of 7.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 7 leaves us with 7.
Include the next digit (7) from the dividend after 7, then repeat: 77 / 40

Moving on to step 2:
40 goes into 77 1 times with a remainder of 37.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
If we take 40 away from 77, we end up with 37.
Take the next digit (2) from the dividend and append it to 37, then repeat: 372 / 40

Going ahead to step 3:
40 goes into 372 9 times with a remainder of 12.
The next digit of our result is 9. 
Result so far: 19.0
If we subtract 360 from 372, we get 12.
Take the next digit (1) from the dividend and append it to 12, then repeat: 121 / 40

On to step 4:
40 goes into 121 3 times with a remainder of 1.
Put 3 as the next digit of the answer. 
Result so far: 193.0
If we take 120 away from 121, we end up with 1.
Fetch the next digit (5) from the dividend, attach it to 1 and continue: 15 / 40

Let's proceed to step 5:
When dividing 15 by 40, we get 0 with a remainder of 15.
Record the quotient 0 as the next digit in the result. 
Result so far: 1930.0
Deduct 0 from 15 and we're left with 15.
Append the next digit (8) from the dividend to 15 and continue with: 158 / 40

Let's proceed to step 6:
40 goes into 158 3 times with a remainder of 38.
Put 3 as the next digit of the answer. 
Result so far: 19303.0
If we take 120 away from 158, we end up with 38.
Since there are no more digits in the dividend, we add a zero to the remainder making it 380, and continue the process.

On to step 7:
40 can be fit into 380 9 times, resulting in a remainder of 20.
Record the quotient 9 as the next digit in the result. 
Result so far: 19303.9
Subtracting 360 from 380 leaves us 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.

Advancing to step 8:
40 can be fit into 200 5 times, resulting in a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 19303.95
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 9:
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: 19303.95
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.

Going ahead to step 10:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 19303.95
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.

After the division, we end up with 19303.95 and a remainder of 0.0.