We're dividing 406009 by 87 
The aim is to understand the frequency of 87 in 406009.

On to step 1:
The number 87 fits into 4 0 times, leaving a remainder of 4.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we take 0 away from 4, we end up with 4.
Bring next digit (0) of the dividend behind the 4 and repeat the process: 40 / 87

Going ahead to step 2:
87 goes into 40 0 times with a remainder of 40.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we take 0 away from 40, we end up with 40.
Bring next digit (6) of the dividend behind the 40 and repeat the process: 406 / 87

Going ahead to step 3:
The number 87 fits into 406 4 times, leaving a remainder of 58.
Put 4 as the next digit of the answer. 
Result so far: 4.0
The remainder is 58 after subtracting 348 from 406.
Grab the next digit (0) from the dividend, add it to 58, then carry on: 580 / 87

Step 4:
The number 87 fits into 580 6 times, leaving a remainder of 58.
Write down 6 as next digit of the result. 
Result so far: 46.0
If we subtract 522 from 580, we get 58.
Include the next digit (0) from the dividend after 58, then repeat: 580 / 87

On to step 5:
If we divide 580 by 87, we get 6 and a remainder of 58.
The next digit of our result is 6. 
Result so far: 466.0
If we take 522 away from 580, we end up with 58.
Fetch the next digit (9) from the dividend, attach it to 58 and continue: 589 / 87

Moving on to step 6:
589 divided by 87 is 6 with a remainder of 67.
Put 6 as the next digit of the answer. 
Result so far: 4666.0
Subtracting 522 from 589 leaves us with 67.
Since there are no more digits in the dividend, we add a zero to the remainder making it 670, and continue the process.

Moving on to step 7:
The number 87 fits into 670 7 times, leaving a remainder of 61.
The number 7 becomes the next digit in our result. 
Result so far: 4666.7
Subtracting 609 from 670 leaves us with 61.
Since there are no more digits in the dividend, we add a zero to the remainder making it 610, and continue the process.

Going ahead to step 8:
The number 87 fits into 610 7 times, leaving a remainder of 1.
The number 7 becomes the next digit in our result. 
Result so far: 4666.77
Subtracting 609 from 610 leaves us 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.

Our division results in 4666.77 with a remaining 0.001.