OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..1079
Eric Weisstein's World of Mathematics, Arithmetic Mean
EXAMPLE
a(16) = 12 subsets: {1}, {2}, {4}, {8}, {16}, {2, 4}, {2, 8}, {2, 16}, {4, 8}, {4, 16}, {8, 16} and {1, 4, 16}.
PROG
(PARI)
sumbybits(v, b) = { my(s=0, i=1); while(b>0, s += (b%2)*v[i]; i++; b >>= 1); (s); };
A339663(n) = { my(ds=divisors(n), u=#ds); sum(m=1, (2^u)-1, !(sumbybits(ds, m)%hammingweight(m))); }; \\ Antti Karttunen, Dec 12 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Dec 11 2020
STATUS
approved