login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A224677
Number of compositions of n*(n+1)/2 into sums of positive triangular numbers.
7
1, 1, 2, 7, 40, 351, 4876, 104748, 3487153, 179921982, 14387581923, 1783124902639, 342504341570010, 101962565961894431, 47044167891731682278, 33640402686770010577421, 37282664267078280296013183, 64038780633654058635677191329, 170478465430659361252118580217675
OFFSET
0,3
LINKS
FORMULA
a(n) = A023361(n*(n+1)/2), where A023361(n) is the number of compositions of n into positive triangular numbers.
a(n) = [x^(n*(n+1)/2)] 1/(1 - Sum_{k>=1} x^(k*(k+1)/2)).
MAPLE
b:= proc(n) option remember; local i; if n=0 then 1 else 0;
for i while i*(i+1)/2<=n do %+b(n-i*(i+1)/2) od; % fi
end:
a:= n-> b(n*(n+1)/2):
seq(a(n), n=0..20); # Alois P. Heinz, Feb 05 2018
MATHEMATICA
b[n_] := b[n] = If[n==0, 1, Sum[If[IntegerQ[Sqrt[8j+1]], b[n-j], 0], {j, 1, n}]];
a[n_] := b[n(n+1)/2];
a /@ Range[0, 20] (* Jean-François Alcover, Oct 31 2020, after Alois P. Heinz in A023361 *)
PROG
(PARI) {a(n)=polcoeff(1/(1-sum(r=1, n+1, x^(r*(r+1)/2)+x*O(x^(n*(n+1)/2)))), n*(n+1)/2)}
for(n=0, 20, print1(a(n), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Apr 14 2013
STATUS
approved