cp's OEIS Frontend

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.

A082550 Number of sets of distinct positive integers whose arithmetic mean is an integer, the largest integer of the set being n.

This page as a plain text file.
%I A082550 #42 Feb 22 2023 12:25:03
%S A082550 1,1,3,3,7,11,19,31,59,103,187,343,631,1171,2191,4095,7711,14571,
%T A082550 27595,52431,99879,190651,364723,699071,1342183,2581111,4971067,
%U A082550 9586983,18512791,35791471,69273667,134217727,260301175,505290271,981706831,1908874583,3714566311
%N A082550 Number of sets of distinct positive integers whose arithmetic mean is an integer, the largest integer of the set being n.
%C A082550 Equivalently, number of nonempty subsets of [n] the sum of whose elements is divisible by n. - _Dimitri Papadopoulos_, Jan 18 2016
%F A082550 a(n) = A063776(n) - 1.
%F A082550 a(n) = A051293(n+1) - A051293(n). - _Reinhard Zumkeller_, Feb 19 2006
%F A082550 a(n) = A008965(n) for odd n. - _Dimitri Papadopoulos_, Jan 18 2016
%F A082550 G.f.: -x/(1 - x) - Sum_{m >= 0} (phi(2*m + 1)/(2*m + 1)) * log(1 - 2*x^(2*m + 1)). - _Petros Hadjicostas_, Jul 13 2019
%F A082550 a(n) = A309402(n,n). - _Alois P. Heinz_, Jul 28 2019
%e A082550 a(5) = 7: the seven sets are (1+2+3+4+5)/5 = 3, 5/1 = 5, (1+5)/2 = 3, (1+3+5)/3 = 3, (3+5)/2 = 4, (3+4+5)/3 = 4, (1+2+4+5)/4 = 3.
%t A082550 Table[Length[Select[Select[Subsets[Range[n]],Max[#]==n&], IntegerQ[ Mean[ #]]&]], {n,22}] (* _Harvey P. Dale_, Jul 23 2011 *)
%t A082550 Table[Total[Table[Length[Select[Select[Subsets[Range[n]], Length[#] == k &],IntegerQ[Total[#]/n] &]], {k, n}]], {n, 10}] (* _Dimitri Papadopoulos_, Jan 18 2016 *)
%o A082550 (PARI) a(n) = sumdiv(n, d, (d%2)* 2^(n/d)*eulerphi(d))/n - 1; \\ _Michel Marcus_, Feb 10 2016
%o A082550 (Python)
%o A082550 from sympy import totient, divisors
%o A082550 def A082550(n): return (sum(totient(d)<<n//d-1 for d in divisors(n>>(~n&n-1).bit_length(),generator=True))<<1)//n-1 # _Chai Wah Wu_, Feb 22 2023
%Y A082550 Cf. A008965, A051293, A063776, A309402.
%Y A082550 Row sums of A267632.
%K A082550 easy,nonn
%O A082550 1,3
%A A082550 _Naohiro Nomoto_, May 03 2003
%E A082550 a(22) from _Harvey P. Dale_, Jul 23 2011
%E A082550 a(23)-a(32) from _Dimitri Papadopoulos_, Jan 18 2016