We look at the division of 502082 by 87 
The aim is to understand the frequency of 87 in 502082.

Let's proceed to step 1:
When dividing 5 by 87, we get 0 with a remainder of 5.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we take 0 away from 5, we end up with 5.
Append the next digit (0) from the dividend to 5 and continue with: 50 / 87

Going ahead to step 2:
The number 87 fits into 50 0 times, leaving a remainder of 50.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 50, we get 50.
Fetch the next digit (2) from the dividend, attach it to 50 and continue: 502 / 87

On to step 3:
The number 87 fits into 502 5 times, leaving a remainder of 67.
The next digit of our result is 5. 
Result so far: 5.0
Subtracting 435 from 502 leaves us with 67.
Fetch the next digit (0) from the dividend, attach it to 67 and continue: 670 / 87

Step 4:
The number 87 fits into 670 7 times, leaving a remainder of 61.
Put 7 as the next digit of the answer. 
Result so far: 57.0
Deduct 609 from 670 and we're left with 61.
Bring next digit (8) of the dividend behind the 61 and repeat the process: 618 / 87

On to step 5:
87 goes into 618 7 times with a remainder of 9.
Write down 7 as next digit of the result. 
Result so far: 577.0
Subtract 609 from 618 to get 9.
Fetch the next digit (2) from the dividend, attach it to 9 and continue: 92 / 87

Advancing to step 6:
If we divide 92 by 87, we get 1 and a remainder of 5.
Write down 1 as next digit of the result. 
Result so far: 5771.0
If we subtract 87 from 92, we get 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Going ahead to step 7:
87 goes into 50 0 times with a remainder of 50.
Use 0 as the next digit of our solution. 
Result so far: 5771.0
If we subtract 0 from 50, we get 50.
Since there are no more digits in the dividend, we add a zero to the remainder making it 500, and continue the process.

Going ahead to step 8:
87 goes into 500 5 times with a remainder of 65.
Record the quotient 5 as the next digit in the result. 
Result so far: 5771.05
If we subtract 435 from 500, we get 65.
Since there are no more digits in the dividend, we add a zero to the remainder making it 650, and continue the process.

Step 9:
When dividing 650 by 87, we get 7 with a remainder of 41.
Use 7 as the next digit of our solution. 
Result so far: 5771.057
If we subtract 609 from 650, we get 41.
Since there are no more digits in the dividend, we add a zero to the remainder making it 410, and continue the process.

Advancing to step 10:
When dividing 410 by 87, we get 4 with a remainder of 62.
Write down 4 as next digit of the result. 
Result so far: 5771.0574
Subtracting 348 from 410 leaves us with 62.
Since there are no more digits in the dividend, we add a zero to the remainder making it 620, and continue the process.

Step 11:
When dividing 620 by 87, we get 7 with a remainder of 11.
Write down 7 as next digit of the result. 
Result so far: 5771.05747
If we take 609 away from 620, we end up with 11.
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 12:
If we divide 110 by 87, we get 1 and a remainder of 23.
Write down 1 as next digit of the result. 
Result so far: 5771.057471
Deduct 87 from 110 and we're left with 23.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Advancing to step 13:
87 can be fit into 230 2 times, resulting in a remainder of 56.
Record the quotient 2 as the next digit in the result. 
Result so far: 5771.0574712
If we take 174 away from 230, we end up with 56.
Since there are no more digits in the dividend, we add a zero to the remainder making it 560, and continue the process.

Advancing to step 14:
560 divided by 87 is 6 with a remainder of 38.
Put 6 as the next digit of the answer. 
Result so far: 5771.05747126
Deduct 522 from 560 and we're left 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.

The final outcome is 5771.05747126, with a leftover of 3.8e-08.