cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A198628 Alternating sums of powers for 1,2,3,4 and 5.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Oct 27 2011

Keywords

Comments

See A196848 for the e.g.f.s and o.g.f.s of such sequences for the numbers 1,2,...,2*n+1, and A196847
for the numbers 1,2,...,2*n.

Crossrefs

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.