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.

A113039 Number of ways the set {1,2,...,n} can be split into three subsets of which the three sums are consecutive.

This page as a plain text file.
%I A113039 #17 Nov 17 2022 16:59:58
%S A113039 0,0,1,0,3,5,0,23,52,0,254,593,0,3611,8859,0,55554,142169,0,946871,
%T A113039 2466282,0,17095813,45359632,0,323760077,870624976,0,6367406592,
%U A113039 17307580710,0,129063054631,353941332518,0,2682355470491,7410591325928,0,56930627178287
%N A113039 Number of ways the set {1,2,...,n} can be split into three subsets of which the three sums are consecutive.
%C A113039 The empty subset is not allowed, otherwise we would get a(2)=1. - _Alois P. Heinz_, Sep 03 2009
%H A113039 Alois P. Heinz, <a href="/A113039/b113039.txt">Table of n, a(n) for n = 1..100</a>
%F A113039 a(n) is the coefficient of x^3y in product(x^(-2k)+x^k(y^k+y^(-k)), k=1..n) for n>2.
%e A113039 For n=5 we have splittings 4/23/15, 4/5/123, 13/5/24, so a(5)=3.
%p A113039 A113039:=proc(n) local i,j,p,t; t:= 0,0; for j from 3 to n do p:=1; for i to j do p:=p*(x^(-2*i)+x^(i)*(y^i+y^(-i))); od; t:=t,coeff(coeff(p,x,3),y,1); od; t; end;
%p A113039 # second Maple program:
%p A113039 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 m; m:= n*(n+1)/2; `if` (n>2 and irem (m,3)=0, b(m/3-1, m/3, m/3+1, n), 0) end: seq (a(n), n=1..42); # _Alois P. Heinz_, Sep 03 2009
%t A113039 a[n_] := If[n <= 2, 0, Product[x^(-2k)+x^k(y^k+y^(-k)), {k, 1, n}] // SeriesCoefficient[#, {x, 0, 3}, {y, 0, 1}]&];
%t A113039 Table[an = a[n]; Print[n, " ", an]; an, {n, 1, 26}] (* _Jean-François Alcover_, Nov 17 2022 *)
%Y A113039 Cf. A112972.
%K A113039 nonn
%O A113039 1,5
%A A113039 _Floor van Lamoen_, Oct 12 2005
%E A113039 Extended beyond a(25) by _Alois P. Heinz_, Sep 03 2009