login
A078732
Numbers n such that the b1(n)^2=b0(n) where b1(n) denotes the number of 1's in binary expansion of n, b0(n) the number of 0's.
1
2, 33, 34, 36, 40, 48, 2051, 2053, 2054, 2057, 2058, 2060, 2065, 2066, 2068, 2072, 2081, 2082, 2084, 2088, 2096, 2113, 2114, 2116, 2120, 2128, 2144, 2177, 2178, 2180, 2184, 2192, 2208, 2240, 2305, 2306, 2308, 2312, 2320, 2336, 2368, 2432, 2561, 2562
OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
36 = 100100_2 with 4 0's and 2 1's, hence 36 is in the sequence.
MATHEMATICA
Select[Range[3000], DigitCount[#, 2, 1]^2==DigitCount[#, 2, 0]&] (* Harvey P. Dale, Aug 18 2017 *)
PROG
(PARI) is(n)=hammingweight(n)^2==hammingweight(bitneg(n, #binary(n))) \\ Charles R Greathouse IV, Mar 29 2013
CROSSREFS
Sequence in context: A073402 A304145 A305485 * A305085 A042251 A316736
KEYWORD
base,nonn
AUTHOR
Benoit Cloitre, Dec 21 2002
STATUS
approved