OFFSET
0,2
COMMENTS
Hankel transform is 3^C(n+1,2). - Philippe Deléham, Feb 01 2009
Inverse binomial transform of A151253. - Philippe Deléham, Feb 03 2009
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Paul Barry, A Note on a One-Parameter Family of Catalan-Like Numbers, JIS 12 (2009) 09.5.4
A. Bostan and M. Kauers, Automatic Classification of Restricted Lattice Walks, arXiv:0811.2899 [math.CO], 2008-2009.
FORMULA
a(n) = Sum_{k=0..n} A120730(n,k)*3^k. - Philippe Deléham, Feb 01 2009
From Philippe Deléham, Feb 02 2009: (Start)
a(2*n+2) = 4*a(2*n+1), a(2*n+1) = 4*a(2*n) - 3^n*A000108(n)
a(2*n+1) = 4*a(2*n) - A005159(n).
G.f.: (sqrt(1 - 12*x^2) + 6*x - 1)/(6*x*(1 - 4*x)). (End)
a(n) ~ 2^(2*n+1)/3. - Vaclav Kotesovec, Oct 31 2017
a(n) = (4*(n+1)*a(n-1) + 12*(n-2)*a(n-2) - 48*(n-2)*a(n-3))/(n+1). - G. C. Greubel, Nov 09 2022
MATHEMATICA
aux[i_, j_, k_, n_]:= Which[Min[i, j, k, n]<0 || Max[i, j, k]>n, 0, n==0, KroneckerDelta[i, j, k, n], True, aux[i, j, k, n]= aux[-1+i, -1+j, k, -1+n] + aux[-1+i, j, -1+k, -1+n] + aux[-1+i, j, k, -1+n] + aux[1+i, j, k, -1+n]]; Table[Sum[aux[i, j, k, n], {i, 0, n}, {j, 0, n}, {k, 0, n}], {n, 0, 30}]
a[n_]:= a[n]= If[n<3, (n+2)!/2, (4*(n+1)*a[n-1] +12*(n-2)*a[n-2] -48*(n-2)*a[n- 3])/(n+1)]; Table[a[n], {n, 0, 40}] (* G. C. Greubel, Nov 09 2022 *)
PROG
(Magma) [n le 3 select Factorial(n+1)/2 else (4*n*Self(n-1) + 12*(n-3)*Self(n-2) - 48*(n-3)*Self(n-3))/n: n in [1..41]]; // G. C. Greubel, Nov 09 2022
(SageMath)
def a(n): # a = A151162
if (n==0): return 1
elif (n%2==1): return 4*a(n-1) - 3^((n-1)/2)*catalan_number((n-1)/2)
else: return 4*a(n-1)
[a(n) for n in (0..40)] # G. C. Greubel, Nov 09 2022
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Manuel Kauers, Nov 18 2008
STATUS
approved