OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
MAPLE
a := proc(n) option remember; if n < 3 then return [1, 3, 13][n+1] fi;
(-84*(n - 2)*a(n-3) - 2*(8*n + 5)*a(n-2) + (11*n + 5)*a(n-1))/(n + 1) end:
seq(a(n), n=0..24);
# Alternative:
gf := 2/(1 - 4*x + sqrt((1 - 6*x)*(2*x + 1))):
ser := series(gf, x, 30): seq(coeff(ser, x, n), n=0..24);
# Or:
series((x^2+x)/(7*x^2+4*x+1), x, 30): gfun:-seriestoseries(%, 'revogf'):
convert(%, polynom) / x: seq(coeff(%, x, n), n=0..24);
MATHEMATICA
With[{C = Binomial}, A064189[n_, k_] := Sum[C[n, j]* (C[n-j, j+k] - C[n-j, j+k+2]), {j, 0, n}]];
a[n_] := 2^n*Sum[A064189[n, k]/2^k, {k, 0, n}];
Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Sep 25 2022 *)
(* Second program *)
A330799[n_]:= Coefficient[Series[2/(1-4*x+Sqrt[(1-6*x)*(1+2*x)]), {x, 0, 50}], x, n]; Table[A330799[n], {n, 0, 30}] (* G. C. Greubel, Sep 14 2023 *)
PROG
(SageMath)
R.<x> = PowerSeriesRing(QQ)
f = (x^2 + x)/(7*x^2 + 4*x+1)
f.reverse().shift(-1).list()
(Magma)
m:=30;
R<x>:=PowerSeriesRing(Rationals(), m+2);
A330799:= func< n | Coefficient(R!( 2/(1-4*x+Sqrt((1-6*x)*(1+2*x))) ), n) >;
[A330799(n): n in [0..m]]; // G. C. Greubel, Sep 14 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Jan 01 2020
STATUS
approved