OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
For n>3, a(n) = (n^2-n+10)/2.
From G. C. Greubel, Jul 13 2017: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3), n >= 7.
G.f.: (1-x+x^2-x^5 + x^6)/(1-x)^3.
E.g.f.: (1/2)*(x^2 + 10)*exp(x) - 4 - 3*x + x^2 - x^3/6. (End)
Sum_{n>=0} 1/a(n) = 1177/840 + 2*Pi*tanh(sqrt(39)*Pi/2)/sqrt(39). - Amiram Eldar, Dec 13 2022
MATHEMATICA
Join[{1, 2, 4, 7}, Table[(n^2 - n + 10)/2, {n, 4, 50}]] (* G. C. Greubel, Jul 13 2017 *)
PROG
(PARI) concat([1, 2, 4, 7], for(n=4, 50, print1((n^2 - n +10)/2, ", "))) \\ G. C. Greubel, Jul 13 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Nov 01 2002
EXTENSIONS
More terms from Sascha Kurz, Feb 10 2003
STATUS
approved