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.

A352291 Odd numbers k such that hammingweight(k^2) < hammingweight(k).

This page as a plain text file.
%I A352291 #19 Mar 14 2022 08:46:28
%S A352291 23,47,95,111,191,223,367,383,415,447,479,727,767,831,887,895,959,
%T A352291 1451,1471,1503,1535,1663,1727,1775,1783,1791,1855,1917,1919,1983,
%U A352291 2527,2911,2943,2991,3071,3327,3455,3549,3551,3567,3575,3583,3695,3711,3837,3839,3967,3999,5793,5823,5855,5883,5885,5887,5949,5951,5983,5993,5999
%N A352291 Odd numbers k such that hammingweight(k^2) < hammingweight(k).
%C A352291 Odd terms in A094694.
%H A352291 David A. Corneth, <a href="/A352291/b352291.txt">Table of n, a(n) for n = 1..10000</a>
%p A352291 select(t -> convert(convert(t^2,base,2),`+`) < convert(convert(t,base,2),`+`), [seq(i,i=1..10^4,2)]); # _Robert Israel_, Mar 13 2022
%t A352291 Select[Range[1, 6000, 2], Greater @@ DigitCount[{#, #^2}, 2, 1] &] (* _Amiram Eldar_, Mar 11 2022 *)
%o A352291 (PARI) forstep(n=1,10^4,2,if(hammingweight(n^2)<hammingweight(n),print1(n,", ")));
%o A352291 (Python)
%o A352291 def ok(n): return n%2 == 1 and bin(n).count('1') > bin(n**2).count('1')
%o A352291 print([k for k in range(6000) if ok(k)]) # _Michael S. Branicky_, Mar 11 2022
%Y A352291 Cf. A000120, A094694.
%K A352291 nonn,base
%O A352291 1,1
%A A352291 _Joerg Arndt_, Mar 11 2022