OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
n*a(n) + n*(n-1)*7 = n^4.
G.f.: (1 - 3*x + 15*x^2 - 7*x^3)/(1-x)^4. - Harvey P. Dale, Feb 18 2018
E.g.f.: (7 - 6*x + 3*x^2 + x^3)*exp(x) - 7. - G. C. Greubel, Sep 11 2021
EXAMPLE
a(2) = 1, 1 + 15 = 2^4;
a(3) = 13, 13 + 27 + 41 = 3^4;
a(4) = 43, 43 + 57 + 71 + 85 = 4^4.
MATHEMATICA
Table[n^3-7n+7, {n, 40}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {1, 1, 13, 43}, 40] (* Harvey P. Dale, Feb 18 2018 *)
PROG
(PARI) a(n) = n^3 - 7*n + 7; \\ Michel Marcus, Sep 05 2013
(Sage) [n*(n^2 -7) +7 for n in (0..40)] # G. C. Greubel, Sep 11 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Andras Erszegi (erszegi.andras(AT)chello.hu), May 14 2005
EXTENSIONS
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 16 2007
STATUS
approved