158201 divided by 40 
The aim is to understand the frequency of 40 in 158201.

Advancing to step 1:
40 can be fit into 1 0 times, resulting in a remainder of 1.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 1 after subtracting 0 from 1.
Take the next digit (5) from the dividend and append it to 1, then repeat: 15 / 40

Advancing to step 2:
The number 40 fits into 15 0 times, leaving a remainder of 15.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 15, we get 15.
Include the next digit (8) from the dividend after 15, then repeat: 158 / 40

Going ahead to step 3:
When dividing 158 by 40, we get 3 with a remainder of 38.
Use 3 as the next digit of our solution. 
Result so far: 3.0
The remainder is 38 after subtracting 120 from 158.
Fetch the next digit (2) from the dividend, attach it to 38 and continue: 382 / 40

On to step 4:
When dividing 382 by 40, we get 9 with a remainder of 22.
The number 9 becomes the next digit in our result. 
Result so far: 39.0
Subtract 360 from 382 to get 22.
Grab the next digit (0) from the dividend, add it to 22, then carry on: 220 / 40

Let's proceed to step 5:
When dividing 220 by 40, we get 5 with a remainder of 20.
The number 5 becomes the next digit in our result. 
Result so far: 395.0
If we take 200 away from 220, we end up with 20.
Fetch the next digit (1) from the dividend, attach it to 20 and continue: 201 / 40

On to step 6:
40 goes into 201 5 times with a remainder of 1.
Put 5 as the next digit of the answer. 
Result so far: 3955.0
If we take 200 away from 201, we end up with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Let's proceed to step 7:
10 divided by 40 is 0 with a remainder of 10.
Write down 0 as next digit of the result. 
Result so far: 3955.0
If we subtract 0 from 10, we 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 8:
The number 40 fits into 100 2 times, leaving a remainder of 20.
Write down 2 as next digit of the result. 
Result so far: 3955.02
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.

Let's proceed to step 9:
40 goes into 200 5 times with a remainder of 0.
Put 5 as the next digit of the answer. 
Result so far: 3955.025
If we subtract 200 from 200, 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 10:
40 goes into 0 0 times with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 3955.025
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.

On to step 11:
40 goes into 0 0 times with a remainder of 0.
The next digit of our result is 0. 
Result so far: 3955.025
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 3955.025 and a remainder of 0.0.