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”).

Number of compositions (ordered partitions) of n into an even number of triangular numbers.
3

%I #8 Dec 03 2020 18:15:34

%S 1,0,1,0,3,0,6,2,13,6,28,20,61,56,135,148,308,380,707,950,1654,2340,

%T 3897,5714,9252,13858,22055,33492,52735,80744,126313,194376,302906,

%U 467506,726862,1123830,1744947,2700682,4190016,6488824,10062649,15588714,24168232,37447884

%N Number of compositions (ordered partitions) of n into an even number of triangular numbers.

%H <a href="/index/Com#comp">Index entries for sequences related to compositions</a>

%H <a href="/index/Pol#polygonal_numbers">Index to sequences related to polygonal numbers</a>

%F G.f.: (1/2) * (1 / (1 - Sum_{k>=1} x^(k*(k + 1)/2)) + 1 / Sum_{k>=0} x^(k*(k + 1)/2)).

%F a(n) = (A023361(n) + A106507(n)) / 2.

%F a(n) = Sum_{k=0..n} A023361(k) * A106507(n-k).

%e a(9) = 6 because we have [6, 3], [3, 6], [6, 1, 1, 1], [1, 6, 1, 1], [1, 1, 6, 1] and [1, 1, 1, 6].

%p b:= proc(n, t) option remember; local r, f, g;

%p if n=0 then t else r, f, g:=$0..2; while f<=n

%p do r, f, g:= r+b(n-f, 1-t), f+g, g+1 od; r fi

%p end:

%p a:= n-> b(n, 1):

%p seq(a(n), n=0..50); # _Alois P. Heinz_, Dec 03 2020

%t nmax = 43; CoefficientList[Series[(1/2) (1/(1 - Sum[x^(k (k + 1)/2), {k, 1, nmax}]) + 1/Sum[x^(k (k + 1)/2), {k, 0, nmax}]), {x, 0, nmax}], x]

%Y Cf. A000217, A023361, A034008, A106507, A339373, A339417.

%K nonn

%O 0,5

%A _Ilya Gutkovskiy_, Dec 03 2020