OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
D-finite with recurrence a(n) = ( 2*(11*n-3)*(n-1)*a(n-1) + 3*(3*n - 4)*(3*n-5)*a(n-2) )/(5*n*(n-1)).
a(n) = [x^n] (16 + 8*hypergeometric2F1([2/3, 1/3], [1/2], (1+x)*27/32) + sqrt(18*(1+x))* hypergeometric2F1([7/6, 5/6], [3/2], (1+x)*27/32))/48.
a(n) = [x^n] (1/(3*sqrt(5 - 27*x)))*(sqrt(5 - 27*x) + 2*sqrt(2)*cos((1/6)*arccos(1 - (27*(1 + x))/16)) + 2*sqrt(6)*sin((1/3)*arcsin((3/4)*sqrt(3/2)*sqrt(1 + x)))).
a(n) ~ 2^(3/2) * 3^(3*n - 1/2) / (sqrt(Pi*n) * 5^(n + 1/2)). - Vaclav Kotesovec, Oct 24 2023
MAPLE
a := proc(n) option remember;
if n < 3 then return [1, 2, 8][n+1] fi;
((60-81*n+27*n^2)*a(n-2) + (22*n^2-28*n+6)*a(n-1))/(5*n*(n-1)) end:
seq(a(n), n=0..24);
# Alternative:
gf := x -> (16 + 8*hypergeom([2/3, 1/3], [1/2], (1+x)*27/32) +
sqrt(18*(1+x))*hypergeom([7/6, 5/6], [3/2], (1+x)*27/32))/48:
ser := series(gf(x), x, 32): evalf(%, 32):
seq(round(coeff(%, x, n)), n=0..24);
# Or:
Gf := x -> (1/(3*sqrt(5 - 27*x)))*(sqrt(5 - 27*x) +
2*sqrt(2)*cos((1/6)*arccos(1 - (27*(1 + x))/16)) +
2*sqrt(6)*sin((1/3)*arcsin((3/4)*sqrt(3/2)*sqrt(1 + x)))):
ser := series(Gf(x), x, 32): evalf(%, 32):
seq(round(coeff(%, x, n)), n=0..24);
MATHEMATICA
a[n_]:= a[n]= If[n<3, 2^n*n!, (2*(n-1)*(11*n-3)*a[n-1] +3*(3*n-4)*(3*n -5)*a[n-2])/(5*n*(n-1))]; (* a=A330793 *)
Table[a[n], {n, 0, 40}] (* G. C. Greubel, Oct 24 2023 *)
PROG
(Magma) [1] cat [n le 2 select 2*(3*n-2) else ( 2*(11*n-3)*(n-1)*Self(n-1) + 3*(3*n-4)*(3*n-5)*Self(n-2) )/(5*n*(n-1)): n in [1..30]]; // G. C. Greubel, Oct 24 2023
(SageMath)
@CachedFunction
def a(n): # a = A330793
if n<3: return (1, 2, 8)[n]
else: return (2*(n-1)*(11*n-3)*a(n-1) + 3*(3*n-4)*(3*n-5)*a(n-2))/(5*n*(n-1))
[a(n) for n in range(41)] # G. C. Greubel, Oct 24 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Jan 10 2020
STATUS
approved