We look at the division of 872540 by 5 
The aim is to understand the frequency of 5 in 872540.

Step 1:
If we divide 8 by 5, we get 1 and a remainder of 3.
Write down 1 as next digit of the result. 
Result so far: 1.0
Subtracting 5 from 8 leaves us with 3.
Bring next digit (7) of the dividend behind the 3 and repeat the process: 37 / 5

On to step 2:
5 goes into 37 7 times with a remainder of 2.
The next digit of our result is 7. 
Result so far: 17.0
If we subtract 35 from 37, we get 2.
Include the next digit (2) from the dividend after 2, then repeat: 22 / 5

Going ahead to step 3:
22 divided by 5 is 4 with a remainder of 2.
Put 4 as the next digit of the answer. 
Result so far: 174.0
If we take 20 away from 22, we end up with 2.
Take the next digit (5) from the dividend and append it to 2, then repeat: 25 / 5

Let's proceed to step 4:
5 can be fit into 25 5 times, resulting in a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 1745.0
Deduct 25 from 25 and we're left with 0.
Take the next digit (4) from the dividend and append it to 0, then repeat: 4 / 5

Going ahead to step 5:
When dividing 4 by 5, we get 0 with a remainder of 4.
Use 0 as the next digit of our solution. 
Result so far: 17450.0
If we subtract 0 from 4, we get 4.
Take the next digit (0) from the dividend and append it to 4, then repeat: 40 / 5

Advancing to step 6:
5 can be fit into 40 8 times, resulting in a remainder of 0.
Record the quotient 8 as the next digit in the result. 
Result so far: 174508.0
Deduct 40 from 40 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.

Step 7:
0 divided by 5 is 0 with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 174508.0
If we take 0 away from 0, we end up 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.

Step 8:
When dividing 0 by 5, we get 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 174508.0
If we subtract 0 from 0, 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.

Our division results in 174508.0 with a remaining 0.0.