A352291 Odd numbers k such that hammingweight(k^2) < hammingweight(k).
23, 47, 95, 111, 191, 223, 367, 383, 415, 447, 479, 727, 767, 831, 887, 895, 959, 1451, 1471, 1503, 1535, 1663, 1727, 1775, 1783, 1791, 1855, 1917, 1919, 1983, 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
Offset: 1
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
Programs
-
Maple
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
-
Mathematica
Select[Range[1, 6000, 2], Greater @@ DigitCount[{#, #^2}, 2, 1] &] (* Amiram Eldar, Mar 11 2022 *)
-
PARI
forstep(n=1,10^4,2,if(hammingweight(n^2)
-
Python
def ok(n): return n%2 == 1 and bin(n).count('1') > bin(n**2).count('1') print([k for k in range(6000) if ok(k)]) # Michael S. Branicky, Mar 11 2022
Comments