cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A118655 Numbers k such that Hamming weight of k equals Hamming weight of k^3.

This page as a plain text file.
%I A118655 #18 Jul 16 2023 02:11:41
%S A118655 1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,56953,
%T A118655 65536,113906,131072,227812,262144,455624,524288,911248,1048576,
%U A118655 1822496,1830651,2097152,3644992,3661302,4194304,5502457,7289984,7322604
%N A118655 Numbers k such that Hamming weight of k equals Hamming weight of k^3.
%C A118655 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.
%H A118655 Donovan Johnson, <a href="/A118655/b118655.txt">Table of n, a(n) for n = 1..177</a> (terms <= 2^40)
%F A118655 A000120(a(n)) = A000120(a(n)^3).
%t A118655 Select[Range[10^6], DigitCount[#, 2, 1] == DigitCount[#^3, 2, 1] &] (* _Amiram Eldar_, Jul 16 2023 *)
%o A118655 (PARI) bitcnt(n)= { local(bitv,bitl) ; bitv=binary(n) ; bitvl=matsize(bitv) ; return(sum(i=1,bitvl[2],bitv[i])) ; }
%o A118655 { for(i=1,8000000, if(bitcnt(i)==bitcnt(i^3), print1(i,",") ; ) ; ) ; }
%Y A118655 Cf. A077436, A000079, A000120.
%K A118655 easy,base,nonn
%O A118655 1,2
%A A118655 _R. J. Mathar_, May 18 2006