A304482
Number A(n,k) of n-element subsets of [k*n] whose elements sum to a multiple of n. Square array A(n,k) with n, k >= 0 read by antidiagonals.
Original entry on oeis.org
1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 3, 2, 1, 0, 1, 4, 6, 8, 0, 0, 1, 5, 12, 30, 18, 1, 0, 1, 6, 20, 76, 126, 52, 0, 0, 1, 7, 30, 155, 460, 603, 152, 1, 0, 1, 8, 42, 276, 1220, 3104, 3084, 492, 0, 0, 1, 9, 56, 448, 2670, 10630, 22404, 16614, 1618, 1, 0, 1, 10, 72, 680, 5138, 28506, 98900, 169152, 91998, 5408, 0, 0
Offset: 0
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, ...
0, 1, 2, 3, 4, 5, 6, 7, ...
0, 0, 2, 6, 12, 20, 30, 42, ...
0, 1, 8, 30, 76, 155, 276, 448, ...
0, 0, 18, 126, 460, 1220, 2670, 5138, ...
0, 1, 52, 603, 3104, 10630, 28506, 64932, ...
0, 0, 152, 3084, 22404, 98900, 324516, 874104, ...
0, 1, 492, 16614, 169152, 960650, 3854052, 12271518, ...
-
with(numtheory):
A:= (n, k)-> `if`(n=0, 1, add(binomial(k*d, d)*(-1)^(n+d)*
phi(n/d), d in divisors(n))/n):
seq(seq(A(n, d-n), n=0..d), d=0..11);
-
A[n_, k_] : = (-1)^n (1/n) Sum[Binomial[k d, d] (-1)^d EulerPhi[n/d], {d, Divisors[n]}]; A[0, 0] = 1; A[, 0] = 0; A[0, ] = 1;
Table[A[n-k, k], {n, 0, 11}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Sep 23 2019 *)
-
T(n,k)=if(n==0, 1, (-1)^n*sumdiv(n, d, binomial(k*d, d) * (-1)^d * eulerphi(n/d))/n)
for(n=0, 7, for(k=0, 7, print1(T(n, k), ", ")); print); \\ Andrew Howroyd, Aug 28 2018
A169888
Number of n-member subsets of 1..2n whose elements sum to a multiple of n.
Original entry on oeis.org
1, 2, 2, 8, 18, 52, 152, 492, 1618, 5408, 18452, 64132, 225432, 800048, 2865228, 10341208, 37568338, 137270956, 504171584, 1860277044, 6892335668, 25631327688, 95640829924, 357975249028, 1343650267288, 5056424257552, 19073789328752, 72108867620204
Offset: 0
-
with(combinat): t0:=[]; for n from 1 to 8 do ans:=0; t1:=choose(2*n,n); for i in t1 do s1:=add(i[j],j=1..n); if s1 mod n = 0 then ans:=ans+1; fi; od: t0:=[op(t0),ans]; od:
-
a[n_] := Sum[(-1)^(n+d)*EulerPhi[n/d]*Binomial[2d, d]/n, {d, Divisors[n]}]; Table[a[n], {n, 1, 26}] (* Jean-François Alcover, Oct 22 2012, after T. D. Noe's program in A145855 *)
-
a(n) = if(n==0, 1, sumdiv(n, d, (-1)^(n+d)*eulerphi(n/d)*binomial(2*d, d)/n)); \\ Altug Alkan, Aug 27 2018, after T. D. Noe at A145855
A318431
Number of n-element subsets of [3n] whose elements sum to a multiple of n.
Original entry on oeis.org
1, 3, 6, 30, 126, 603, 3084, 16614, 91998, 520779, 3004206, 17594250, 104308092, 624801960, 3775722348, 22991162130, 140928103134, 868886416869, 5384796884934, 33525472069566, 209592226792326, 1315211209647435, 8281053081282900, 52301607644921262
Offset: 0
-
with(numtheory); a := n -> `if`(n=0, 1, (-1)^n * 1/n * add(binomial(3*d,d)*(-1)^d*phi(n/d), d in divisors(n)));
-
a(n) = if (n, (-1)^n * (1/n) * sumdiv(n, d, binomial(3*d,d)*(-1)^d*eulerphi(n/d)), 1); \\ Michel Marcus, Aug 27 2018
A318433
Number of n-element subsets of [5n] whose elements sum to a multiple of n.
Original entry on oeis.org
1, 5, 20, 155, 1220, 10630, 98900, 960650, 9613700, 98462675, 1027222520, 10877596900, 116613287300, 1263159501180, 13803839298920, 152000845788280, 1684888825463940, 18785707522181965, 210536007879090140, 2370423142929112065, 26799168520704093720
Offset: 0
-
with(numtheory); a := n -> `if`(n=0, 1, (-1)^n * 1/n * add(binomial(5*d,d)*(-1)^d*phi(n/d), d in divisors(n)));
-
a(n) = if (n, (-1)^n * (1/n) * sumdiv(n, d, binomial(5*d,d)*(-1)^d*eulerphi(n/d)), 1); \\ Michel Marcus, Aug 27 2018
Showing 1-4 of 4 results.
Comments