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.

A035470 Number of ways to break {1,2,3,...,n} into sets with equal sums.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 6, 12, 11, 2, 80, 166, 2, 665, 2918, 3309, 9296, 23730, 31875, 301030, 422897, 2, 13716867, 71504980, 100664385, 54148591, 880696662, 498017759, 27450476787, 111911522819, 179459955554, 2144502175214, 59115423983, 45837019664552, 375743493787258, 816118711787493, 2, 9492169507922
Offset: 1

Views

Author

Keywords

Comments

a(n) = 2 <=> |{d|n*(n+1)/2 : d>=n}| = 2. - Alois P. Heinz, Sep 03 2009

Examples

			a(7) = 6 since we have 1234567, 16/25/34/7, 167/2345, 257/1346, 347/1256, 356/1247.
From _Gus Wiseman_, Jul 13 2019: (Start)
The a(6) = 2 through a(9) = 11 set partitions with equal block-sums:
  {123456}      {1234567}        {12345678}        {123456789}
  {16}{25}{34}  {1247}{356}      {12348}{567}      {12345}{69}{78}
                {1256}{347}      {12357}{468}      {1239}{456}{78}
                {1346}{257}      {12456}{378}      {1248}{357}{69}
                {167}{2345}      {1278}{3456}      {1257}{348}{69}
                {16}{25}{34}{7}  {1368}{2457}      {1347}{258}{69}
                                 {1458}{2367}      {1356}{249}{78}
                                 {1467}{2358}      {159}{2346}{78}
                                 {1236}{48}{57}    {159}{267}{348}
                                 {138}{246}{57}    {168}{249}{357}
                                 {156}{237}{48}    {18}{27}{36}{45}{9}
                                 {18}{27}{36}{45}
(End)
		

Crossrefs

Programs

  • Maple
    with(numtheory): b:= proc() option remember; local i, j, t; `if`(args[1]=0, `if`(nargs=2, 1, b(args[t] $t=2..nargs)), add(`if`(args[j] -args[nargs] <0, 0, b(sort([seq(args[i] -`if`(i=j, args[nargs], 0), i=1..nargs-1)])[], args[nargs]-1)), j=1..nargs-1)) end: a:= proc(n) local i, m, x; m:= n*(n+1)/2; 1+ add(b(i$(m/i), n)/(m/i)!, i=[select(x-> x>=n, divisors(m) minus {m})[]]) end: seq(a(n), n=1..25);  # Alois P. Heinz, Sep 03 2009
  • Mathematica
    b[args_List] := b[args] = If[args[[1]] == 0, If[Length[args] == 2, 1, b[Rest[args]]], Sum[If[args[[j]] - args[[-1]] < 0, 0, b[Sort[Join[Table[ args[[i]] - If[i == j, args[[-1]], 0], {i, 1, Length[args]-1}]]], {args[[-1]]-1}]], {j, 1, Length[args]-1}]]; b[a1_List, a2_List] := b[Join[a1, a2]];
    a[n_] := a[n] = With[{m = n*(n+1)/2}, 1+Sum[b[Append[Array[i&, m/i], n]] / (m/i)!, {i, Select[Divisors[m] ~Complement~ {m}, # >= n &]}]];
    Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 25}] (* Jean-François Alcover, Mar 22 2017, after Alois P. Heinz *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],SameQ@@Total/@#&]],{n,0,10}] (* Gus Wiseman, Jul 13 2019 *)

Extensions

More terms from John W. Layman, Mar 18 2002
a(19)-a(33) from Alois P. Heinz, Sep 03 2009
a(34) from Alois P. Heinz, May 24 2015
a(35)-a(38) from Max Alekseyev, Feb 15 2024