%I #26 Feb 17 2022 00:55:21
%S 0,10,31,64,110,170,245,336,444,570,715,880,1066,1274,1505,1760,2040,
%T 2346,2679,3040,3430,3850,4301,4784,5300,5850,6435,7056,7714,8410,
%U 9145,9920,10736,11594,12495,13440,14430,15466,16549,17680,18860,20090
%N Truncated triangular pyramid numbers: a(n) = Sum_{k=9..n} (k*(k+1)/2 - 45).
%H Vincenzo Librandi, <a href="/A051943/b051943.txt">Table of n, a(n) for n = 9..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).
%F a(n) = (n+20)*(n-8)*(n-9)/6.
%F G.f.: x^10*(10-9*x)/(1-x)^4. - _Colin Barker_, Apr 30 2012
%F a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - _Vincenzo Librandi_, Jun 18 2012
%t LinearRecurrence[{4,-6,4,-1},{0,10,31,64},50] (* _Vincenzo Librandi_, Jun 18 2012 *)
%o (Magma) I:=[0, 10, 31, 64]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..45]]; // _Vincenzo Librandi_, Jun 18 2012
%o (PARI) a(n)=(n+20)*(n-8)*(n-9)/6 \\ _Charles R Greathouse IV_, Nov 10 2015
%Y Cf. A000292.
%K easy,nice,nonn
%O 9,2
%A Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 21 1999