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.

A112956 a(n) = number of ways the set {1,2,...,n} can be split into proper subsets with equal sums.

This page as a plain text file.
%I A112956 #19 Mar 22 2017 06:22:59
%S A112956 0,0,1,1,1,1,5,11,10,1,79,165,1,664,2917,3308,9295,23729,31874,301029,
%T A112956 422896,1,13716866,71504979,100664384,54148590,880696661,498017758,
%U A112956 27450476786,111911522818,179459955553,2144502175213,59115423982,45837019664551
%N A112956 a(n) = number of ways the set {1,2,...,n} can be split into proper subsets with equal sums.
%C A112956 For n=7 we have splittings 761/5432, 752/6431, 743/6521, 7421/653 and 7/61/52/43 so a(7)=5.
%C A112956 a(n) = 1 <=> n*(n+1)/2 is product of two primes. - _Alois P. Heinz_, Sep 03 2009
%F A112956 a(n) = A035470(n) - 1. - _Franklin T. Adams-Watters_, Jun 02 2006
%p A112956 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; 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
%t A112956 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]];
%t A112956 a[n_] := a[n] = With[{m = n*(n + 1)/2}, Sum[b[Append[Array[i&, m/i], n]] / (m/i)!, {i, Select[Divisors[m] ~Complement~ {m}, # >= n&]}]];
%t A112956 Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 25}] (* _Jean-François Alcover_, Mar 22 2017, after _Alois P. Heinz_ *)
%Y A112956 Cf. A035470.
%Y A112956 Cf. A164977, A164978. - _Alois P. Heinz_, Sep 03 2009
%K A112956 nonn
%O A112956 1,7
%A A112956 _Floor van Lamoen_, Oct 07 2005
%E A112956 More terms from _Franklin T. Adams-Watters_, Jun 02 2006
%E A112956 a(19)-a(33) from _Alois P. Heinz_, Sep 03 2009
%E A112956 a(34) from _Alois P. Heinz_, Aug 06 2016