OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = n*(n+5)/2 = A000217(n+2) - 3 for n>=1. - Emeric Deutsch, Mar 01 2004
a(n) = n + a(n-1) + 2, n>1. - Vincenzo Librandi, Dec 06 2009
E.g.f.: 1 + x*(x + 6)*exp(x)/2. - G. C. Greubel, May 14 2017
PROG
(PARI) a(n)=if(n, n*(n+5)/2, 1) \\ Charles R Greathouse IV, Jun 11 2015
(Magma) [n eq 0 select 1 else n*(n+5)/2: n in [0..50]]; // G. C. Greubel, Jul 31 2022
(SageMath) [n*(n+5)/2 + bool(n==0) for n in (0..50)] # G. C. Greubel, Jul 31 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved