OFFSET
0,3
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
G.f.: (1-3*x)/(1-x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = -A067998(n+1). - Joerg Arndt, Jun 13 2015
a(n) = (-1)^n*A131386(n+1). - Bruno Berselli, Jun 15 2015
E.g.f.: (1 - x - x^2)*exp(x). - G. C. Greubel, May 11 2017
Sum_{n>=2} 1/a(n) = -3/4. - Amiram Eldar, Feb 17 2023
MATHEMATICA
Table[1 - n^2, {n, 0, 50}] (* or *) LinearRecurrence[{3, -3, 1}, {1, 0, -3}, 50]
PROG
(Magma) [1-n^2: n in [0..50]];
(Magma) I:=[1, 0, -3]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..50]];
(PARI) my(x='x+O('x^50)); Vec((1-3*x)/(1-x)^3) \\ G. C. Greubel, May 11 2017
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Vincenzo Librandi, Jun 12 2015
STATUS
approved