login
Number of nonempty subsets of divisors of n whose average is an integer.
4

%I #10 Dec 15 2021 17:38:53

%S 1,2,3,4,3,9,3,7,6,6,3,24,3,7,13,12,3,27,3,22,11,7,3,72,6,6,12,21,3,

%T 83,3,20,13,6,11,133,3,7,11,70,3,82,3,21,38,7,3,230,7,14,13,23,3,88,

%U 11,65,11,6,3,763,3,7,35,36,11,84,3,22,13,73,3,780,3,6,37,20,11,82,3,228

%N Number of nonempty subsets of divisors of n whose average is an integer.

%H Antti Karttunen, <a href="/A339663/b339663.txt">Table of n, a(n) for n = 1..1079</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ArithmeticMean.html">Arithmetic Mean</a>

%H <a href="/index/Di#divisors">Index entries for sequences related to divisors of numbers</a>

%e 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}.

%o (PARI)

%o sumbybits(v,b) = { my(s=0,i=1); while(b>0,s += (b%2)*v[i]; i++; b >>= 1); (s); };

%o A339663(n) = { my(ds=divisors(n), u=#ds); sum(m=1, (2^u)-1, !(sumbybits(ds,m)%hammingweight(m))); }; \\ _Antti Karttunen_, Dec 12 2021

%Y Cf. A027750, A051293, A100587, A339664, A339665, A339666.

%K nonn

%O 1,2

%A _Ilya Gutkovskiy_, Dec 11 2020