A063776
Number of subsets of {1,2,...,n} which sum to 0 modulo n.
Original entry on oeis.org
2, 2, 4, 4, 8, 12, 20, 32, 60, 104, 188, 344, 632, 1172, 2192, 4096, 7712, 14572, 27596, 52432, 99880, 190652, 364724, 699072, 1342184, 2581112, 4971068, 9586984, 18512792, 35791472, 69273668, 134217728, 260301176, 505290272, 981706832
Offset: 1
Ahmed Fares (ahmedfares(AT)my-deja.com), Aug 16 2001
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 + ...
- Seiichi Manyama, Table of n, a(n) for n = 1..3333 (first 200 terms from T. D. Noe)
- T. Amdeberhan, M. Can and V. Moll, Broken bracelets, Molien series, paraffin wax and the elliptic curve 48a4, SIAM Journal of Discrete Math., v.25, 2011, p. 1843. See equation (1.2).
- Juhani Karhumäki, S. Puzynina, M. Rao, and M. A. Whiteland, On cardinalities of k-abelian equivalence classes, arXiv preprint arXiv:1605.03319 [math.CO], 2016.
- N. Kitchloo and L. Pachter, An interesting result about subset sums, preprint (pdf file), 1993.
- N. Kitchloo and L. Pachter, An interesting result about subset sums, preprint (pdf file), 1993.
-
a063776 n = a053636 n `div` n -- Reinhard Zumkeller, Sep 13 2013
-
Table[a = Select[ Divisors[n], OddQ[ # ] &]; Apply[Plus, 2^(n/a)*EulerPhi[a]]/n, {n, 1, 35}]
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 *)
Table[Length[Select[Subsets[Range[n]],#=={}||MemberQ[#,n]&&IntegerQ[Mean[#]]&]],{n,0,10}] (* Gus Wiseman, Sep 14 2019 *)
-
{a(n) = if( n<1, 0, 1 / n * sumdiv( n, d, (d % 2) * eulerphi(d) * 2^(n / d)))}; /* Michael Somos, May 09 2013 */
-
a(n) = sumdiv(n, d, (d%2)* 2^(n/d)*eulerphi(d))/n; \\ Michel Marcus, Feb 10 2016
-
from sympy import totient, divisors
def A063776(n): return (sum(totient(d)<>(~n&n-1).bit_length(),generator=True))<<1)//n # Chai Wah Wu, Feb 21 2023
A053635
a(n) = Sum_{d|n} phi(d)*2^(n/d).
Original entry on oeis.org
0, 2, 6, 12, 24, 40, 84, 140, 288, 540, 1080, 2068, 4224, 8216, 16548, 32880, 65856, 131104, 262836, 524324, 1049760, 2097480, 4196412, 8388652, 16782048, 33554600, 67117128, 134218836, 268452240, 536870968, 1073777040, 2147483708, 4295033472, 8589938808
Offset: 0
- Seiichi Manyama, Table of n, a(n) for n = 0..3321
- James East and Ron Niles, Integer polygons of given perimeter, arXiv:1710.11245 [math.CO], 2017.
- James East and Ron Niles, Integer polygons of given perimeter, Bull. Aust. Math. Soc. 100(1) (2019), 131-147.
- T. Pisanski, D. Schattschneider, and B. Servatius, Applying Burnside's lemma to a one-dimensional Escher problem, Math. Mag., 79 (2006), 167-180. See v(n).
-
[0] cat [&+[EulerPhi(d)*2^(n div d): d in Divisors(n)]: n in [1..40]]; // Vincenzo Librandi, Jul 20 2019
-
with(numtheory); A053685:=n->add( phi(n/d)*2^d, d in divisors(n)); # N. J. A. Sloane, Nov 21 2009
-
a[0] = 0; a[n_] := Sum[EulerPhi[d] 2^(n/d), {d, Divisors[n]}];
Table[a[n], {n, 0, 31}] (* Jean-François Alcover, Aug 30 2018 *)
-
a(n) = if (n, sumdiv(n, d, eulerphi(d)*2^(n/d)), 0); \\ Michel Marcus, Sep 20 2017
A309122
Sum of the sizes of all subsets of [n] whose sum is divisible by n.
Original entry on oeis.org
1, 1, 6, 6, 20, 34, 70, 124, 270, 516, 1034, 2060, 4108, 8198, 16440, 32760, 65552, 131142, 262162, 524312, 1048740, 2097162, 4194326, 8388856, 16777300, 33554444, 67109418, 134217764, 268435484, 536872072, 1073741854, 2147483632, 4294969404, 8589934608
Offset: 1
a(5) = 20 = 0 + 1 + 2 + 2 + 3 + 3 + 4 + 5 = |{}| + |{5}| + |{1,4}| + |{2,3}| + |{1,4,5}| + |{2,3,5}| + |{1,2,3,4}| + |{1,2,3,4,5}|.
-
b:= proc(n, m, s) option remember; `if`(n=0, [`if`(s=0, 1, 0), 0],
b(n-1, m, s) +(g-> g+[0, g[1]])(b(n-1, m, irem(s+n, m))))
end:
a:= proc(n) option remember; forget(b); b(n$2, 0)[2] end:
seq(a(n), n=1..40);
-
b[n_, m_, s_] := b[n, m, s] = If[n == 0, {If[s == 0, 1, 0], 0},
b[n-1, m, s] + Function[g, g + {0, g[[1]]}][b[n-1, m, Mod[s+n, m]]]];
a[n_] := b[n, n, 0][[2]];
Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Mar 19 2022, after Alois P. Heinz *)
A309128
(1/n) times the sum of the elements of all subsets of [n] whose sum is divisible by n.
Original entry on oeis.org
1, 1, 4, 4, 12, 20, 40, 70, 150, 284, 564, 1116, 2212, 4392, 8768, 17404, 34704, 69214, 137980, 275264, 549340, 1096244, 2188344, 4369196, 8724196, 17422500, 34797476, 69505628, 138845940, 277383904, 554189344, 1107296248, 2212559996, 4421289872, 8835361488
Offset: 1
The subsets of [5] whose sum is divisible by 5 are: {}, {5}, {1,4}, {2,3}, {1,4,5}, {2,3,5}, {1,2,3,4}, {1,2,3,4,5}. The sum of their elements is 0 + 5 + 5 + 5 + 10 + 10 + 10 + 15 = 60. So a(5) = 60/5 = 12.
-
b:= proc(n, m, s) option remember; `if`(n=0, [`if`(s=0, 1, 0), 0],
b(n-1, m, s) +(g-> g+[0, g[1]*n])(b(n-1, m, irem(s+n, m))))
end:
a:= proc(n) option remember; forget(b); b(n$2, 0)[2]/n end:
seq(a(n), n=1..40);
-
b[n_, m_, s_] := b[n, m, s] = If[n == 0, {If[s == 0, 1, 0], 0},
b[n-1, m, s] + Function[g, g+{0, g[[1]] n}][b[n-1, m, Mod[s+n, m]]]];
a[n_] := b[n, n, 0][[2]]/n;
Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Mar 19 2022, after Alois P. Heinz *)
Showing 1-4 of 4 results.
Comments