We're dividing 805838 by 40 
The aim is to understand the frequency of 40 in 805838.

Step 1:
The number 40 fits into 8 0 times, leaving a remainder of 8.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 8 leaves us with 8.
Take the next digit (0) from the dividend and append it to 8, then repeat: 80 / 40

Advancing to step 2:
When dividing 80 by 40, we get 2 with a remainder of 0.
Use 2 as the next digit of our solution. 
Result so far: 2.0
Deduct 80 from 80 and we're left with 0.
Take the next digit (5) from the dividend and append it to 0, then repeat: 5 / 40

Let's proceed to step 3:
40 goes into 5 0 times with a remainder of 5.
Use 0 as the next digit of our solution. 
Result so far: 20.0
Deduct 0 from 5 and we're left with 5.
Append the next digit (8) from the dividend to 5 and continue with: 58 / 40

Let's proceed to step 4:
If we divide 58 by 40, we get 1 and a remainder of 18.
Write down 1 as next digit of the result. 
Result so far: 201.0
Subtracting 40 from 58 leaves us with 18.
Append the next digit (3) from the dividend to 18 and continue with: 183 / 40

Advancing to step 5:
183 divided by 40 is 4 with a remainder of 23.
The number 4 becomes the next digit in our result. 
Result so far: 2014.0
The remainder is 23 after subtracting 160 from 183.
Bring next digit (8) of the dividend behind the 23 and repeat the process: 238 / 40

Step 6:
If we divide 238 by 40, we get 5 and a remainder of 38.
The next digit of our result is 5. 
Result so far: 20145.0
The remainder is 38 after subtracting 200 from 238.
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.
Use 9 as the next digit of our solution. 
Result so far: 20145.9
Subtract 360 from 380 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.

Advancing to step 8:
If we divide 200 by 40, we get 5 and a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 20145.95
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 9:
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: 20145.95
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 10:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 20145.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.

The final outcome is 20145.95, with a leftover of 0.0.