login
A352291
Odd numbers k such that hammingweight(k^2) < hammingweight(k).
1
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,1
COMMENTS
Odd terms in A094694.
LINKS
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 *)
PROG
(PARI) forstep(n=1, 10^4, 2, if(hammingweight(n^2)<hammingweight(n), print1(n, ", ")));
(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
CROSSREFS
Sequence in context: A281022 A054821 A195058 * A039374 A043197 A043977
KEYWORD
nonn,base
AUTHOR
Joerg Arndt, Mar 11 2022
STATUS
approved