OFFSET
0,2
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (15,-85,225,-274,120).
FORMULA
a(n) = Sum_{j=1..5} j^n*(-1)^(j+1).
E.g.f.: Sum_{j=1..5} exp(j*x)*(-1)^(j+1) = exp(x)*(1+exp(5*x))/(1+exp(x)).
O.g.f.: Sum_{j=1..5} (-1)^(j+1)/(1-j*x) = (1-12*x+55*x^2-114*x^3+94*x^4)/Product_{j=1..5} (1-j*x).
A formula for the numbers of the numerator polynomial is given in A196848.
a(n) = 15*a(n-1) - 85*a(n-2) + 225*a(n-3) - 274*a(n-4) + 120*a(n-5). - Wesley Ivan Hurt, Feb 13 2026
MAPLE
A198628 := proc(n)
3^n-4^n+1-2^n+5^n ;
end proc:
seq(A198628(n), n=0..20) ; # R. J. Mathar, May 11 2022
MATHEMATICA
LinearRecurrence[{15, -85, 225, -274, 120}, {1, 3, 15, 81, 435}, 30] (* Harvey P. Dale, Dec 30 2024 *)
PROG
(Magma) [1-2^n+3^n-4^n+5^n: n in [0..30]]; // Wesley Ivan Hurt, Feb 13 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Oct 27 2011
EXTENSIONS
New name from Wesley Ivan Hurt, Feb 13 2026
STATUS
approved