login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A118655
Numbers k such that Hamming weight of k equals Hamming weight of k^3.
4
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 56953, 65536, 113906, 131072, 227812, 262144, 455624, 524288, 911248, 1048576, 1822496, 1830651, 2097152, 3644992, 3661302, 4194304, 5502457, 7289984, 7322604
OFFSET
1,2
COMMENTS
A000079(n) is a subsequence because the Hamming weight of any A000079(n) is 1 and cubing such a number just adds binary zeros. A077436 is the sequence when the a(n) is squared, not cubed as here.
LINKS
Donovan Johnson, Table of n, a(n) for n = 1..177 (terms <= 2^40)
FORMULA
A000120(a(n)) = A000120(a(n)^3).
MATHEMATICA
Select[Range[10^6], DigitCount[#, 2, 1] == DigitCount[#^3, 2, 1] &] (* Amiram Eldar, Jul 16 2023 *)
PROG
(PARI) bitcnt(n)= { local(bitv, bitl) ; bitv=binary(n) ; bitvl=matsize(bitv) ; return(sum(i=1, bitvl[2], bitv[i])) ; }
{ for(i=1, 8000000, if(bitcnt(i)==bitcnt(i^3), print1(i, ", ") ; ) ; ) ; }
CROSSREFS
KEYWORD
easy,base,nonn
AUTHOR
R. J. Mathar, May 18 2006
STATUS
approved