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

On to step 1:
If we divide 5 by 87, we get 0 and a remainder of 5.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Append the next digit (0) from the dividend to 5 and continue with: 50 / 87

Advancing to step 2:
50 divided by 87 is 0 with a remainder of 50.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
The remainder is 50 after subtracting 0 from 50.
Bring next digit (7) of the dividend behind the 50 and repeat the process: 507 / 87

On to step 3:
When dividing 507 by 87, we get 5 with a remainder of 72.
The number 5 becomes the next digit in our result. 
Result so far: 5.0
If we subtract 435 from 507, we get 72.
Grab the next digit (5) from the dividend, add it to 72, then carry on: 725 / 87

Step 4:
725 divided by 87 is 8 with a remainder of 29.
Put 8 as the next digit of the answer. 
Result so far: 58.0
If we take 696 away from 725, we end up with 29.
Fetch the next digit (9) from the dividend, attach it to 29 and continue: 299 / 87

Moving on to step 5:
87 goes into 299 3 times with a remainder of 38.
Record the quotient 3 as the next digit in the result. 
Result so far: 583.0
The remainder is 38 after subtracting 261 from 299.
Grab the next digit (8) from the dividend, add it to 38, then carry on: 388 / 87

Moving on to step 6:
If we divide 388 by 87, we get 4 and a remainder of 40.
Write down 4 as next digit of the result. 
Result so far: 5834.0
Deduct 348 from 388 and we're left with 40.
Since there are no more digits in the dividend, we add a zero to the remainder making it 400, and continue the process.

On to step 7:
87 goes into 400 4 times with a remainder of 52.
The number 4 becomes the next digit in our result. 
Result so far: 5834.4
The remainder is 52 after subtracting 348 from 400.
Since there are no more digits in the dividend, we add a zero to the remainder making it 520, and continue the process.

On to step 8:
87 can be fit into 520 5 times, resulting in a remainder of 85.
Put 5 as the next digit of the answer. 
Result so far: 5834.45
The remainder is 85 after subtracting 435 from 520.
Since there are no more digits in the dividend, we add a zero to the remainder making it 850, and continue the process.

Moving on to step 9:
850 divided by 87 is 9 with a remainder of 67.
The next digit of our result is 9. 
Result so far: 5834.459
Subtract 783 from 850 to get 67.
Since there are no more digits in the dividend, we add a zero to the remainder making it 670, and continue the process.

Step 10:
87 can be fit into 670 7 times, resulting in a remainder of 61.
Use 7 as the next digit of our solution. 
Result so far: 5834.4597
If we take 609 away from 670, we end up 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.

On to step 11:
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: 5834.45977
The remainder is 1 after subtracting 609 from 610.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

The final outcome is 5834.45977, with a leftover of 1e-06.