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.

A203017 Number of partitions of {1,2,...,3n} into 3 n-element subsets having the same sum.

Original entry on oeis.org

1, 0, 1, 2, 32, 305, 4331, 63261, 1025113, 17495345, 313692810, 5838204047, 112185853894, 2213711510395, 44691175805738, 920173212324164, 19274796589413439, 409908483736507979, 8835309887111026335, 192739853119591626715, 4250191938786946069812, 94641409538083474973850
Offset: 0

Views

Author

Alois P. Heinz, Jan 06 2012

Keywords

Comments

The element sum of each subset is n*(3*n+1)/2 = A005449(n).

Examples

			a(0) = 1: {}, {}, {}.
a(1) = 0: there is no partition of {1,2,3} into 3 1-element subsets having the same sum.
a(2) = 1: {1,6}, {2,5}, {3,4}.
a(3) = 2: {1,5,9}, {2,6,7}, {3,4,8}; {1,6,8}, {2,4,9}, {3,5,7}.
		

Crossrefs

Row n=3 of A203986.

Programs

  • Maple
    b:= proc() option remember; local i, j, t, k, m; m:= args[nargs-1]; k:= args[nargs-0]; if args[1]=0 then `if`(nargs=3, 1, b(args[t]$t=2..nargs)) elif args[1]<1 then 0 else add(`if`(args[j] b((n*(3*n+1)/2 +n/97)$3, 3*n, n)/`if`(n>0, 6, 1):
    seq(a(n), n=0..10);
  • Mathematica
    b[args_] := b[args] = Module[{nargs = Length[args], k = args[[-1]], m = args[[-2]]}, Which[args[[1]] == 0, If[nargs == 3, 1, b[args[[2 ;; nargs]] ]], args[[1]]<1, 0, True, Sum[If[args[[j]] < m, 0, b[Join[Sort[Table[ args[[i]] - If[i == j, m + 1/97, 0], {i, 1, nargs - 2}]], {m - 1, k}]]], {j, 1, nargs-2}]]];
    A[n_, k_] := If[n == 0 || k == 0, 1, b[Join[Array[(k*(n*k + 1)/2 + k/97)&, n], {k*n, k}]]/n!];
    a[k_] := A[3, k];
    a /@ Range[0, 10] (* Jean-François Alcover, Dec 05 2020, after Alois P. Heinz *)