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.

A063776 Number of subsets of {1,2,...,n} which sum to 0 modulo n.

This page as a plain text file.
%I A063776 #64 Mar 29 2024 02:16:52
%S A063776 2,2,4,4,8,12,20,32,60,104,188,344,632,1172,2192,4096,7712,14572,
%T A063776 27596,52432,99880,190652,364724,699072,1342184,2581112,4971068,
%U A063776 9586984,18512792,35791472,69273668,134217728,260301176,505290272,981706832
%N A063776 Number of subsets of {1,2,...,n} which sum to 0 modulo n.
%C A063776 From _Gus Wiseman_, Sep 14 2019: (Start)
%C A063776 Also the number of subsets of {1..n} that are empty or contain n and have integer mean. If the subsets are not required to contain n, we get A327475. For example, the a(1) = 2 through a(6) = 12 subsets are:
%C A063776   {}   {}   {}       {}       {}           {}
%C A063776   {1}  {2}  {3}      {4}      {5}          {6}
%C A063776             {1,3}    {2,4}    {1,5}        {2,6}
%C A063776             {1,2,3}  {2,3,4}  {3,5}        {4,6}
%C A063776                               {1,3,5}      {1,2,6}
%C A063776                               {3,4,5}      {1,5,6}
%C A063776                               {1,2,4,5}    {2,4,6}
%C A063776                               {1,2,3,4,5}  {4,5,6}
%C A063776                                            {1,2,3,6}
%C A063776                                            {1,4,5,6}
%C A063776                                            {2,3,5,6}
%C A063776                                            {2,3,4,5,6}
%C A063776 (End)
%H A063776 Seiichi Manyama, <a href="/A063776/b063776.txt">Table of n, a(n) for n = 1..3333</a> (first 200 terms from T. D. Noe)
%H A063776 T. Amdeberhan, M. Can and V. Moll, <a href="http://dx.doi.org/10.1137/110819925">Broken bracelets, Molien series, paraffin wax and the elliptic curve 48a4</a>, SIAM Journal of Discrete Math., v.25, 2011, p. 1843. See equation (1.2).
%H A063776 Juhani Karhumäki, S. Puzynina, M. Rao, and M. A. Whiteland, <a href="https://arxiv.org/abs/1605.03319">On cardinalities of k-abelian equivalence classes</a>, arXiv preprint arXiv:1605.03319 [math.CO], 2016.
%H A063776 N. Kitchloo and L. Pachter, <a href="https://web.archive.org/web/20150912170614/https://math.berkeley.edu/~lpachter/papers/modpaper2.pdf">An interesting result about subset sums</a>, preprint (pdf file), 1993.
%H A063776 N. Kitchloo and L. Pachter, <a href="https://www.researchgate.net/publication/2581268_An_Interesting_Result_About_Subset_Sums">An interesting result about subset sums</a>, preprint (pdf file), 1993.
%F A063776 a(n) = (1/n) * Sum_{d divides n and d is odd} 2^(n/d) * phi(d).
%F A063776 a(n) = (1/n) * A053636(n). - _Michael Somos_, May 09 2013
%F A063776 a(n) = 2 * A000016(n).
%F A063776 For odd n, a(n) = A000031(n).
%F A063776 G.f.: -Sum_{m >= 0} (phi(2*m + 1)/(2*m + 1)) * log(1 - 2*x^(2*m + 1)). - _Petros Hadjicostas_, Jul 13 2019
%F A063776 a(n) = A082550(n) + 1. - _Gus Wiseman_, Sep 14 2019
%e A063776 G.f. = 2*x + 2*x^2 + 4*x^3 + 4*x^4 + 8*x^5 + 12*x^6 + 20*x^7 + 32*x^8 + 60*x^9 + ...
%t A063776 Table[a = Select[ Divisors[n], OddQ[ # ] &]; Apply[Plus, 2^(n/a)*EulerPhi[a]]/n, {n, 1, 35}]
%t A063776 a[ n_] := If[ n < 1, 0, 1/n Sum[ Mod[ d, 2] EulerPhi[ d] 2^(n / d), {d, Divisors[ n]}]]; (* _Michael Somos_, May 09 2013 *)
%t A063776 Table[Length[Select[Subsets[Range[n]],#=={}||MemberQ[#,n]&&IntegerQ[Mean[#]]&]],{n,0,10}] (* _Gus Wiseman_, Sep 14 2019 *)
%o A063776 (PARI) {a(n) = if( n<1, 0, 1 / n * sumdiv( n, d, (d % 2) * eulerphi(d) * 2^(n / d)))}; /* _Michael Somos_, May 09 2013 */
%o A063776 (Haskell)
%o A063776 a063776 n = a053636 n `div` n  -- _Reinhard Zumkeller_, Sep 13 2013
%o A063776 (PARI) a(n) = sumdiv(n, d, (d%2)* 2^(n/d)*eulerphi(d))/n; \\ _Michel Marcus_, Feb 10 2016
%o A063776 (Python)
%o A063776 from sympy import totient, divisors
%o A063776 def A063776(n): return (sum(totient(d)<<n//d-1 for d in divisors(n>>(~n&n-1).bit_length(),generator=True))<<1)//n # _Chai Wah Wu_, Feb 21 2023
%Y A063776 The superdiagonal of A068009.
%Y A063776 Cf. A000010, A000013, A051293, A053633, A053634, A053636, A054539, A082550.
%Y A063776 Cf. A000016, A065795, A327475, A327481.
%K A063776 nonn,nice
%O A063776 1,1
%A A063776 Ahmed Fares (ahmedfares(AT)my-deja.com), Aug 16 2001
%E A063776 More terms from _Vladeta Jovovic_, Aug 20 2001