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”).
%I #11 Aug 18 2019 07:11:08
%S 0,1,2,6,14,33,77,174,389,860,1885,4098,8853,19020,40668,86593,183698,
%T 388421,818892,1721884,3611968,7560337,15793474,32932549,68556300,
%U 142495004,295754816,613039248,1269137729,2624393922,5421024773,11186523404,23061994524
%N Total number of triangular numbers in all compositions of n.
%H Alois P. Heinz, <a href="/A309536/b309536.txt">Table of n, a(n) for n = 0..3312</a>
%F G.f.: Sum_{k>=1} x^(k*(k+1)/2)*(1-x)^2/(1-2*x)^2.
%F a(n) ~ c * 2^n * n, where c = 0.1604081401637884665734606925563573585565153844... - _Vaclav Kotesovec_, Aug 18 2019
%e a(4) = 14: (1)(1)(1)(1), 2(1)(1), (1)2(1), (1)(1)2, 22, (3)(1), (1)(3), 4.
%p a:= proc(n) option remember; add(a(n-j)+
%p `if`(issqr(8*j+1), ceil(2^(n-j-1)), 0), j=1..n)
%p end:
%p seq(a(n), n=0..33);
%t CoefficientList[Series[(EllipticTheta[2, 0, Sqrt[x]]/(2*x^(1/8)) - 1)*((1 - x)^2/(1 - 2*x)^2), {x, 0, 30}], x] (* _Vaclav Kotesovec_, Aug 18 2019 *)
%Y Cf. A000217, A102291, A263235.
%K nonn
%O 0,3
%A _Alois P. Heinz_, Aug 06 2019