OFFSET
1,3
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
MAPLE
q:= n-> (s-> is(s(n^2)=(t->t(s(n)))(h->h*(h+1)/2)))(
k-> add(i, i=Bits[Split](k))):
select(q, [$0..555])[]; # Alois P. Heinz, Feb 01 2021
MATHEMATICA
s[n_] := DigitCount[n, 2, 1]; t[n_] := n*(n + 1)/2; Select[Range[0, 500], s[#^2] == t[s[#]] &] (* Amiram Eldar, Feb 01 2021 *)
PROG
(PARI) isok(n) = my(hn=hammingweight(n)); hammingweight(n^2) == hn*(hn+1)/2; \\ Michel Marcus, Feb 01 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Max Alekseyev, Feb 01 2021
STATUS
approved