Let's divide 542502 by 6
The aim is to understand the frequency of 6 in 542502.

Advancing to step 1:
When dividing 5 by 6, we get 0 with a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we take 0 away from 5, we end up with 5.
Grab the next digit (4) from the dividend, add it to 5, then carry on: 54 / 6

Let's proceed to step 2:
If we divide 54 by 6, we get 9 and a remainder of 0.
Record the quotient 9 as the next digit in the result. 
Result so far: 9.0
The remainder is 0 after subtracting 54 from 54.
Include the next digit (2) from the dividend after 0, then repeat: 2 / 6

Let's proceed to step 3:
The number 6 fits into 2 0 times, leaving a remainder of 2.
Use 0 as the next digit of our solution. 
Result so far: 90.0
If we subtract 0 from 2, we get 2.
Include the next digit (5) from the dividend after 2, then repeat: 25 / 6

On to step 4:
6 goes into 25 4 times with a remainder of 1.
Record the quotient 4 as the next digit in the result. 
Result so far: 904.0
Deduct 24 from 25 and we're left with 1.
Include the next digit (0) from the dividend after 1, then repeat: 10 / 6

Moving on to step 5:
6 goes into 10 1 times with a remainder of 4.
Write down 1 as next digit of the result. 
Result so far: 9041.0
Subtract 6 from 10 to get 4.
Append the next digit (2) from the dividend to 4 and continue with: 42 / 6

Going ahead to step 6:
6 goes into 42 7 times with a remainder of 0.
The number 7 becomes the next digit in our result. 
Result so far: 90417.0
Deduct 42 from 42 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.

On to step 7:
When dividing 0 by 6, we get 0 with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 90417.0
Subtracting 0 from 0 leaves us 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.

Advancing to step 8:
If we divide 0 by 6, we get 0 and a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 90417.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 90417.0 with a remaining 0.0.