login
a(n) = (n^3 + 5*n + 18)/6.
2

%I #40 Nov 20 2023 15:23:56

%S 0,2,3,4,6,10,17,28,44,66,95,132,178,234,301,380,472,578,699,836,990,

%T 1162,1353,1564,1796,2050,2327,2628,2954,3306,3685,4092,4528,4994,

%U 5491,6020,6582,7178,7809,8476,9180,9922,10703,11524,12386,13290,14237

%N a(n) = (n^3 + 5*n + 18)/6.

%C a(n) = (m^2 - 6*m + 17)*m/6 where m = n+2. - _Frank Ellermann_

%H Harry J. Smith, <a href="/A060163/b060163.txt">Table of n, a(n) for n = -2..1000</a>

%H Ângela Mestre and José Agapito, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL22/Mestre/mestre2.html">Square Matrices Generated by Sequences of Riordan Arrays</a>, J. Int. Seq., Vol. 22 (2019), Article 19.8.4.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).

%F a(n) = a(n-1) + A000124(n-1) = A060162(n+3, n) = A004006(n)+3 = A000125(n) + 2.

%F It appears that a(n) = A011826(n+1) + 1.

%F a(n) = n + 2 + binomial(n,3) (with different offset). - _Zerinvary Lajos_, Jul 23 2006

%F G.f.: (2 - 5*x + 4*x^2)/(x*(1 - x)^4). - _Stefano Spezia_, Nov 19 2023

%p seq((n^3 + 5*n + 18)/6, n=-2..46); # _Zerinvary Lajos_, Jul 23 2006

%t a=2;s=3;lst={-3,-1,0,1,s};Do[a+=n;s+=a;AppendTo[lst,s],{n,2,6!,1}];lst+3 (* _Vladimir Joseph Stephan Orlovsky_, May 24 2009 *)

%t Table[(n^3+5n+18)/6,{n,-2,50}] (* or *) LinearRecurrence[{4,-6,4,-1},{0,2,3,4},50] (* _Harvey P. Dale_, Mar 11 2015 *)

%o (PARI) { for (n=-2, 1000, write("b060163.txt", n, " ", (n^3 + 5*n + 18)/6); ) } \\ _Harry J. Smith_, Jul 02 2009

%o (Magma) [(n^3+5*n+18)/6 : n in [-2..50]]; // _Wesley Ivan Hurt_, Mar 25 2020

%Y Cf. A000124, A000125, A004006, A011826, A060162.

%K easy,nonn

%O -2,2

%A _Henry Bottomley_, Mar 13 2001