For example 6,
convert to the base 2 = 110
number of 1's is 2(prime), number of zero's is 1(prime - 1)
or 496 = (111110000)2
5(prime) times 1 and 4 times 0
Is this always correct?
For example 6,
convert to the base 2 = 110
number of 1's is 2(prime), number of zero's is 1(prime - 1)
or 496 = (111110000)2
5(prime) times 1 and 4 times 0
Is this always correct?
On
It is always correct for even perfect numbers. It has been proven that all even perfect numbers are of the form $(2^p-1)\cdot 2^{p-1}$ where $2^p-1$ (and hence $p$) is prime. The factor $2^{p-1}$ gives the $0$s and the factor $2^p-1$ gives the $1$s.
It is unknown whether there are any odd perfect numbers. If there are, they will have a $1$ in the ones bit, so will not fit your pattern.
Every even perfect number has that form, this is the Euclid-Euler theorem.
No odd perfect number can have that form (as the last binary digit would be 1). So now we just need to know if there are any odd perfect numbers. I'll leave that determination as an exercise.