Perfect numbers in binary

The largest currently known perfect number is an even number with 148 , 414 , 561 148{,}414{,}561 binary digits. Let a a be the number of 1's in its binary representation, and let b b be the number of 0's. What is a b ? a-b?


The answer is 1.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Peter Macgregor
Mar 7, 2016

We will prove a more general result about the binary form of all even perfect numbers.

We'll start with the Euler-Euclid result that all even perfect numbers are of the form

2 p 1 ( 2 p 1 ) 2^{p-1}(2^{p}-1)

(For this to yield a perfect number p must be prime and the second factor must also be prime, but these details are not needed to solve the problem.)

Writing this product out in binary gives

( 100 00 ) ( 111 111 ) (100\dots00)(111\dots111)

where the first factor has ( p 1 ) (p-1) zeros and the second factor consists of ( p ) (p) ones. Just as in our home base of ten, a multiplication like this is easy - we just append the zeros from the first factor to the second factor to get

111 11100 00 111\dots11100\dots00

and so

a b = ( p ) ( p 1 ) = 1 a-b=(p)-(p-1)=\boxed{1}

However the factors have respectively (p-1) zeros and p ones

Andrea Virgillito - 4 years, 10 months ago

Log in to reply

Thanks Andrea.

I've edited the solution now.

Peter

Peter Macgregor - 4 years, 10 months ago
Shaun Leong
Mar 7, 2016

The formula for a perfect number is 2 k ( 2 k + 1 1 ) 2^k(2^{k+1}-1) where k + 1 k+1 is prime.

In its binary expansion, 2 k + 1 1 2^{k+1}-1 is a string of ' 1 1 's of length k + 1 k+1 .

2 k 1 2^{k}-1 is a string of ' 0 0 's of length k k at the back of the string of ' 1 1 's.

Hence a b = k + 1 k a-b=k+1-k = 1 =\boxed{1}

Test it with: 2[ex3] - 1 = 7 ( three 1's). 2[ex2] - 1 = 3 (two 1's)

Joe Cohen - 4 years, 1 month ago

Log in to reply

The property holds good for all perfect even numbers. 7 and 3 are not perfect even numbers.

Anu Rag - 3 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...