871251 ÷ 40 
The aim is to understand the frequency of 40 in 871251.

Let's proceed to step 1:
The number 40 fits into 8 0 times, leaving a remainder of 8.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtracting 0 from 8 leaves us with 8.
Include the next digit (7) from the dividend after 8, then repeat: 87 / 40

Moving on to step 2:
If we divide 87 by 40, we get 2 and a remainder of 7.
Put 2 as the next digit of the answer. 
Result so far: 2.0
Subtracting 80 from 87 leaves us with 7.
Append the next digit (1) from the dividend to 7 and continue with: 71 / 40

Step 3:
If we divide 71 by 40, we get 1 and a remainder of 31.
The next digit of our result is 1. 
Result so far: 21.0
Subtract 40 from 71 to get 31.
Fetch the next digit (2) from the dividend, attach it to 31 and continue: 312 / 40

Advancing to step 4:
40 can be fit into 312 7 times, resulting in a remainder of 32.
Write down 7 as next digit of the result. 
Result so far: 217.0
Subtracting 280 from 312 leaves us with 32.
Include the next digit (5) from the dividend after 32, then repeat: 325 / 40

Advancing to step 5:
40 can be fit into 325 8 times, resulting in a remainder of 5.
Use 8 as the next digit of our solution. 
Result so far: 2178.0
Deduct 320 from 325 and we're left with 5.
Include the next digit (1) from the dividend after 5, then repeat: 51 / 40

Moving on to step 6:
The number 40 fits into 51 1 times, leaving a remainder of 11.
The number 1 becomes the next digit in our result. 
Result so far: 21781.0
The remainder is 11 after subtracting 40 from 51.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

On to step 7:
40 goes into 110 2 times with a remainder of 30.
Put 2 as the next digit of the answer. 
Result so far: 21781.2
Subtract 80 from 110 to get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Let's proceed to step 8:
40 can be fit into 300 7 times, resulting in a remainder of 20.
The number 7 becomes the next digit in our result. 
Result so far: 21781.27
If we take 280 away from 300, we end up 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 9:
40 goes into 200 5 times with a remainder of 0.
The next digit of our result is 5. 
Result so far: 21781.275
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.

Advancing to step 10:
0 divided by 40 is 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 21781.275
The remainder is 0 after subtracting 0 from 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:
If we divide 0 by 40, we get 0 and a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 21781.275
Subtract 0 from 0 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.

The final result is 21781.275 with a remainder of 0.0.