OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
FORMULA
From Vaclav Kotesovec, Oct 21 2012: (Start)
G.f.: (3 - (x+1)*sqrt(1-4*x))/((x+2)*sqrt(1-4*x)).
Recurrence: 2*n*a(n) = (7*n-4)*a(n-1) + 2*(2*n-1)*a(n-2).
a(n) ~ 2^(2*n+2)/(3*sqrt(Pi*n)) (End)
MATHEMATICA
CoefficientList[Series[1/(2+x)+3/((2+x)*Sqrt[1-4*x])-1, {x, 0, 20}], x] (* Vaclav Kotesovec, Oct 21 2012 *)
PROG
(PARI) my(x='x+O('x^66)); Vec( 1/(2+x)+3/((2+x)*sqrt(1-4*x))-1 ) \\ Joerg Arndt, May 04 2013
(Magma) [1] cat [n le 2 select 2^(2*n-1) else ((7*n-4)*Self(n-1) + 2*(2*n-1)*Self(n-2))/(2*n): n in [1..40]]; // G. C. Greubel, Jul 01 2024
(SageMath)
@CachedFunction
def a(n): # a = A026638
if n<3: return 2^(n*(n+1)/2)
else: return ((7*n-4)*a(n-1) + 2*(2*n-1)*a(n-2))/(2*n)
[a(n) for n in range(41)] # G. C. Greubel, Jul 01 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved