OFFSET
0,7
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:
A373388 := n -> subs({p = 1, q = 1, x = -1}, G(n)*(1 - x)^(n + 1)):
seq(A373388(n), n = 0..20);
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] = ReplaceAll[G[n]*(1-x)^(n+1), {p -> 1, q -> 1, x -> -1}]; Table[a[n], {n, 0, 34}] (* Jean-François Alcover, Jun 08 2024, after Maple program *)
CROSSREFS
KEYWORD
sign
AUTHOR
Peter Luschny, Jun 03 2024
STATUS
approved