This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A066571 #42 Aug 18 2024 20:14:11 %S A066571 1,3,9,31,117,479,2061,9183,42021,196239,931457,4480531,21793257, %T A066571 107004891,529656765,2640160039,13241371629,66771501151,338333343825, %U A066571 1721768732423,8796192611917,45096680384635,231945566136129,1196461977291959,6188390166782849 %N A066571 Number of sets of positive integers with arithmetic mean n. %C A066571 From _Franklin T. Adams-Watters_, Sep 13 2011: (Start) %C A066571 If we use nonnegative integers instead of positive integers, we get this sequence shifted left (i.e., with offset 0). %C A066571 The largest number that can be included in set of positive integers with mean n is the triangular number n*(n+1)/2 = A000217(n). %C A066571 All values are odd. Sets including n are paired with the same set with n removed, with exception of {n}, as the empty set has no average. %C A066571 (End) %H A066571 Martin Fuller, <a href="/A066571/b066571.txt">Table of n, a(n) for n = 1..200</a> %F A066571 Sum of coefficient of t^k x^(n*k) in Product_{i=1..n*k} (1+t*x^i) for k <= 2*n-1. - _N. J. A. Sloane_ %F A066571 From _Martin Fuller_, Sep 14 2023: (Start) %F A066571 Constant term in formal Laurent series (Product_{i=1-n..n*(n-1)/2} (1+x^i)) - 1. %F A066571 a(n) = (Sum_{i=0..n*(n-1)/2} A053632(n-1,i)*A000009(i))*2-1. (End) %e A066571 a(2) = 3 as there are three sets viz. {2}, {1,3}, {1,2,3}, each of which has the arithmetic mean 2. %e A066571 a(3) = 9: the nine sets are {3}, {1, 5}, {2, 4}, {1, 2, 6}, {1, 3, 5}, {2, 3, 4}, {1, 2, 3, 6}, {1, 2, 4, 5}, {1, 2, 3, 4, 5}. %p A066571 g := k->expand(mul(1+t*x^i,i=1..k)); A066571 := proc(n) local k; add(coeff(coeff(g(n*k),t,k),x,n*k),k=1..2*n-1); end; %t A066571 g[k_] := Expand[Product[1 + t*x^i, {i, 1, k}]]; a[n_] := Sum[Coefficient[ Coefficient[g[n*k], t, k], x, n*k], {k, 1, 2*n - 1}]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 10}] (* _Jean-François Alcover_, Feb 10 2018, translated from Maple *) %o A066571 (Haskell) %o A066571 a066571 n = f [1..] 1 n 0 where %o A066571 f (k:ks) l nl x %o A066571 | y > nl = 0 %o A066571 | y < nl = f ks (l + 1) (nl + n) y + f ks l nl x %o A066571 | otherwise = if y `mod` l == 0 then 1 else 0 %o A066571 where y = x + k %o A066571 -- _Reinhard Zumkeller_, Feb 13 2013 %Y A066571 Cf. A066572, A000217. %Y A066571 Cf. A072701, A164283. %K A066571 nonn,nice %O A066571 1,2 %A A066571 _Amarnath Murthy_, Dec 19 2001 %E A066571 Corrected and extended by _N. J. A. Sloane_, Dec 19 2001 %E A066571 More terms from _Naohiro Nomoto_, Jun 19 2002 %E A066571 More terms from _David Wasserman_, Sep 10 2002 %E A066571 More terms from _Martin Fuller_, Sep 14 2023