Let's divide 516687 by 3
The aim is to understand the frequency of 3 in 516687.

Advancing to step 1:
If we divide 5 by 3, we get 1 and a remainder of 2.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
Subtracting 3 from 5 leaves us with 2.
Include the next digit (1) from the dividend after 2, then repeat: 21 / 3

Moving on to step 2:
3 can be fit into 21 7 times, resulting in a remainder of 0.
Put 7 as the next digit of the answer. 
Result so far: 17.0
If we take 21 away from 21, we end up with 0.
Fetch the next digit (6) from the dividend, attach it to 0 and continue: 6 / 3

Advancing to step 3:
The number 3 fits into 6 2 times, leaving a remainder of 0.
Record the quotient 2 as the next digit in the result. 
Result so far: 172.0
The remainder is 0 after subtracting 6 from 6.
Append the next digit (6) from the dividend to 0 and continue with: 6 / 3

On to step 4:
The number 3 fits into 6 2 times, leaving a remainder of 0.
Put 2 as the next digit of the answer. 
Result so far: 1722.0
Subtract 6 from 6 to get 0.
Include the next digit (8) from the dividend after 0, then repeat: 8 / 3

Moving on to step 5:
If we divide 8 by 3, we get 2 and a remainder of 2.
Write down 2 as next digit of the result. 
Result so far: 17222.0
Subtract 6 from 8 to get 2.
Fetch the next digit (7) from the dividend, attach it to 2 and continue: 27 / 3

Let's proceed to step 6:
If we divide 27 by 3, we get 9 and a remainder of 0.
Use 9 as the next digit of our solution. 
Result so far: 172229.0
Deduct 27 from 27 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:
3 can be fit into 0 0 times, resulting in a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 172229.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.

Going ahead to step 8:
When dividing 0 by 3, we get 0 with a remainder of 0.
The next digit of our result is 0. 
Result so far: 172229.0
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.

After the division, we end up with 172229.0 and a remainder of 0.0.