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.
%I A212314 #24 Nov 07 2022 07:40:52 %S A212314 0,5,9,10,17,18,20,33,34,36,39,40,49,65,66,68,69,72,78,80,98,105,129, %T A212314 130,132,135,136,138,144,156,160,169,196,199,209,210,229,257,258,260, %U A212314 263,264,270,272,276,277,288,291,297,312,313,320,338,359,365,392,395,398,418 %N A212314 Numbers m such that B(m^3) = 3*B(m), where B(m) is the binary weight of m (A000120). %C A212314 2*k is a term if and only if k is a term. - _Robert Israel_, Nov 06 2022 %H A212314 Robert Israel, <a href="/A212314/b212314.txt">Table of n, a(n) for n = 1..10000</a> %F A212314 A000120(a(n)^3) = A000120(a(n)) * 3. %p A212314 select(n -> convert(convert(n^3,base,2),`+`) = 3*convert(convert(n,base,2),`+`), [$0..1000]); # _Robert Israel_, Nov 06 2022 %o A212314 (Python) %o A212314 import math %o A212314 for n in range(10000): %o A212314 c1 = c2 = 0 %o A212314 t = n %o A212314 while t: %o A212314 c1+=t&1 %o A212314 t>>=1 %o A212314 t = n*n*n %o A212314 while t: %o A212314 c2+=t&1 %o A212314 t>>=1 %o A212314 if c1*3==c2: print(str(n), end=',') %o A212314 (Sage) %o A212314 s = lambda n: sum((n^3).digits(2)) - 3*sum(n.digits(2)) %o A212314 [n for n in (0..418) if s(n)==0] # _Peter Luschny_, Oct 24 2013 %o A212314 (PARI) isok(m) = hammingweight(m^3) == 3*hammingweight(m); \\ _Michel Marcus_, Nov 06 2022 %Y A212314 Cf. A000120, A077436, A083567, A118655, A212315. %Y A212314 Includes A136318. %K A212314 nonn,base,easy %O A212314 1,2 %A A212314 _Alex Ratushnyak_, Oct 24 2013