A198628 Alternating sums of powers for 1,2,3,4 and 5.
1, 3, 15, 81, 435, 2313, 12195, 63801, 331395, 1710153, 8775075, 44808921, 227890755, 1155180393, 5839846755, 29458152441, 148335904515, 745888593033, 3746364947235, 18799770158361, 94271405748675, 472449569948073, 2366624981836515, 11850654345690681, 59323452211439235
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (15,-85,225,-274,120).
Programs
-
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 *)
Formula
a(n) = sum(((-1)^(j+1))*j^n,j=1..5) = 1-2^n+3^n-4^n+5^n.
E.g.f.: sum(((-1)^(j+1))*exp(j*x),j=1..5) =
exp(x)*(1+exp(5*x))/(1+exp(x)).
O.g.f.: sum(((-1)^(j+1))/(1-j*x),j=1..5) =
(1-12*x+55*x^2-114*x^3+94*x^4)/product(1-j*x,j=1..5).
A formula for the numbers of the numerator polynomial is given in A196848.
Comments