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.

A373389 The Eulerian zig-zag polynomials A205497 evaluated at x = -1/2 and normalized by (-2)^n.

Original entry on oeis.org

1, 1, 1, -1, -1, 7, 1, -103, 197, 2143, -11717, -50245, 700541, 445297, -46679363, 145710035, 3366506123, -28627646249, -232615347479, 4589590326917, 7797081908429, -722997025420733, 2790363142173367, 112843029882305495, -1235970846163474579, -16017081358111849247
Offset: 0

Views

Author

Peter Luschny, Jun 03 2024

Keywords

Crossrefs

Programs

  • Maple
    # Using the recurrence by Kyle Petersen from A205497.
    G := proc(n) option remember; local F;
    if n = 0 then 1/(1 - q*x) else F := G(n - 1);
    simplify((p/(p - q))*(subs({p = q, q = p}, F) - subs(p = q, F))) fi end:
     A373389 := n -> (-2)^n*subs({p = 1, q = 1, x = -1/2}, G(n)*(1 - x)^(n + 1)):
    seq(A373389(n), n = 0..22);
  • Mathematica
    G[n_] := G[n] = Module[{F}, If[n == 0, 1/(1-q*x), F = G[n-1]; Simplify[ (p/(p-q))*(ReplaceAll[F, {p -> q, q -> p}] - ReplaceAll[F, p -> q])]]];
    a[n_] := a[n] = (-2)^n*ReplaceAll[G[n]*(1-x)^(n+1), {p -> 1, q -> 1, x -> -1/2}];
    Table[Print[n, " ", a[n]]; a[n], {n, 0, 25}] (* Jean-François Alcover, Jun 08 2024, after Maple program *)