%I #35 Dec 19 2023 17:41:13
%S 1,2,14,54,154,364,756,1428,2508,4158,6578,10010,14742,21112,29512,
%T 40392,54264,71706,93366,119966,152306,191268,237820,293020,358020,
%U 434070,522522,624834,742574,877424,1031184,1205776,1403248,1625778,1875678,2155398,2467530
%N a(n) = (1)*(2 + 3 + 4 + ... + n) + (1 + 2)*(3 + 4 + 5 + ... + n) + (1 + 2 + 3)*(4 + 5 + 6 + ... + n) + ... + (1 + 2 + 3 + ... + n-1)*n.
%H Colin Barker, <a href="/A067056/b067056.txt">Table of n, a(n) for n = 1..1000</a>
%H Bünyamin Şahin, <a href="https://doi.org/10.20944/preprints202312.0902.v1">Level Polynomials of Rooted Trees</a>, 2023.
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (6,-15,20,-15,6,-1).
%F a(n) = Sum_{r=1..n-1} t(r)*(t(n) - t(r)), where t(r) is the r-th triangular number, n>1.
%F a(n) = n*(2*n^4 + 5*n^3 - 5*n - 2)/60 = (n-1)*n*(n+1)*(n+2)*(2*n+1)/60, n>1. - _Ralf Stephan_, Apr 30 2004
%F a(n) = 2*A005585(n-1), n>1. - _R. J. Mathar_, May 20 2013
%F a(n) = Sum_{i=1..n} A000217(i)*A001105(n-i) for n>1, a(1)=1. - _Bruno Berselli_, Mar 06 2018
%F From _Colin Barker_, Mar 06 2018: (Start)
%F G.f.: x*(1 - 4*x + 17*x^2 - 20*x^3 + 15*x^4 - 6*x^5 + x^6) / (1 - x)^6.
%F a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6) for n>7.
%F (End)
%e a(4) = (1)*(2+3+4) + (1+2)*(3+4) + (1+2+3)*(4) = 9 + 21 + 24 = 54.
%t Join[{1},Table[Total[Total[#[[1]]Total[#[[2]]]]&/@Table[TakeDrop[ Range[ k],n],{n,k-1}]],{k,2,40}]] (* Requires Mathematica version 10 or later *) (* or *) LinearRecurrence[{6,-15,20,-15,6,-1},{1,2,14,54,154,364,756},40] (* _Harvey P. Dale_, Jul 17 2020 *)
%o (PARI) t(n) = n*(n+1)/2;
%o a(n) = if (n=1, 1, sum(k=1, n-1, t(k)*(t(n) - t(k)))); \\ _Michel Marcus_, Mar 06 2018
%o (PARI) Vec(x*(1 - 4*x + 17*x^2 - 20*x^3 + 15*x^4 - 6*x^5 + x^6) / (1 - x)^6 + O(x^60)) \\ _Colin Barker_, Mar 06 2018
%Y Cf. A000217, A001105, A005585.
%K nonn,easy
%O 1,2
%A _Amarnath Murthy_, Jan 02 2002
%E More terms from _Jason Earls_, Jan 11 2002