|
|
A151374
|
|
Number of walks within N^2 (the first quadrant of Z^2) starting at (0, 0), ending on the vertical axis and consisting of 2n steps taken from {(-1, -1), (-1, 0), (1, 1)}.
|
|
23
|
|
|
1, 2, 8, 40, 224, 1344, 8448, 54912, 366080, 2489344, 17199104, 120393728, 852017152, 6085836800, 43818024960, 317680680960, 2317200261120, 16992801914880, 125210119372800, 926554883358720, 6882979133521920, 51309480813527040, 383705682605506560, 2877792619541299200
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Also the number of strings of length 2*n of two different types of balanced parentheses.
For example, a(1) = 2, since the two possible strings of length 2 are [] and (), a(2) = 8, since the 8 possible strings of length 4 are (()), [()], ([]), [[]], ()(), [](), ()[], and [][].
The number of strings of length 2*n of t different types of balanced parentheses is given by t^n * A000108(n): there are n opening parentheses in the strings, giving t^n choices for the type (the closing parentheses are chosen to match). (End)
|
|
LINKS
|
|
|
FORMULA
|
a(n) is the top left term in M^n, M = the following infinite square production matrix:
2, 2, 0, 0, 0, 0, ...
2, 2, 2, 0, 0, 0, ...
2, 2, 2, 2, 0, 0, ...
2, 2, 2, 2, 2, 0, ...
2, 2, 2, 2, 2, 2, ...
...
(End)
E.g.f.: Let F(x)=Sum_{n>=0} a(n)*x^n/(2*n)!, then F(x) = E(0)/(1-sqrt(x)) where E(k) = 1 - sqrt(x)/(1 - sqrt(x)/(sqrt(x) - (k+1)*(k+2)/2/E(k+1) )); (continued fraction ). - Sergei N. Gladkovskii, Apr 05 2013
G.f.: 1 + 4*x/(G(0)-4*x) where G(k) = k*(8*x+1) + 4*x + 2 - 2*x*(2*k+3)*(2*k+4)/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Apr 05 2013
D-finite with recurrence (n+1)*a(n) + 4*(-2*n+1)*a(n-1) = 0. - R. J. Mathar, Mar 05 2014
a(n) = Sum_{k = 0..floor(n/2)} A046521(n,2*k)*Catalan(2*k).
G.f.: A(x) = 1/sqrt(1 - 4*x)*e(x/(1 - 4*x)), where e(x) = (c(x) + c(-x))/2 is the even part of the function c(x) = (1 - sqrt(1 - 4*x))/(2*x), the g.f. of the Catalan numbers A000108. Inversely, (c(x) + c(-x))/2 = 1/sqrt(1 + 4*x)*A(x/(1 + 4*x)).
x*A(x) = Series reversion of (x - 2*x^2). (End)
Sum_{n>=0} 1/a(n) = 68/49 + 96*arctan(1/sqrt(7)) / (49*sqrt(7)). - Vaclav Kotesovec, Nov 23 2021
Sum_{n>=0} (-1)^n/a(n) = 20/27 - 16*log(2)/81. - Amiram Eldar, Jan 25 2022
G.f.: 1/(1-2*x/(1-2*x/(1-2*x/(1-2*x/(1-2*x/(1-2*x/(1-2*x/(1-2*x/(1-...))))))))(continued fraction). - Nikolaos Pantelidis, Nov 20 2022
a(n) = 2*Sum_{k=1..n} a(k-1)*a(n-k), a(0) = 1. - Mehdi Naima, Jan 16 2023
|
|
MAPLE
|
A151374_list := proc(n) local j, a, w; a := array(0..n); a[0] := 1;
for w from 1 to n do a[w] := 2*(a[w-1]+add(a[j]*a[w-j-1], j=1..w-1)) od;
|
|
MATHEMATICA
|
aux[i_Integer, j_Integer, n_Integer] := Which[Min[i, j, n] < 0 || Max[i, j] > n, 0, n == 0, KroneckerDelta[i, j, n], True, aux[i, j, n] = aux[-1 + i, -1 + j, -1 + n] + aux[1 + i, j, -1 + n] + aux[1 + i, 1 + j, -1 + n]]; Table[Sum[aux[0, k, 2 n], {k, 0, 2 n}], {n, 0, 25}]
|
|
PROG
|
(PARI) x='x+O('x^66); Vec(sqrt(2-8*x-2*sqrt(1-8*x))/(4*x)) \\ Joerg Arndt, May 11 2013
(Sage)
a, n = 1, 1
while True:
yield a
n += 1
a = a * (8*n - 12) // n
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,walk
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|