A026122 a(n) is the number of (s(0),s(1),...,s(n)) such that every s(i) is a nonnegative integer, s(0) = 1, s(n) = 1, |s(1) - s(0)| = 1, |s(i) - s(i-1)| <= 1 for i >= 2. Also a(n) = T(n,n), where T is the array in A026120.
2, 4, 11, 28, 74, 196, 525, 1416, 3846, 10508, 28864, 79664, 220818, 614460, 1715874, 4807008, 13506534, 38052972, 107477319, 304261404, 863188662, 2453737132, 6988033949, 19935797080, 56966012730, 163026450132, 467219178549, 1340810339036
Offset: 2
Keywords
Programs
-
Mathematica
Drop[CoefficientList[Series[-1 + (1 - x)^2*(-1 + x + Sqrt[1 - 2*x - 3*x^2])^2 / (4*x^4), {x, 0, 30}], x], 2] (* Vaclav Kotesovec, Sep 17 2019 *)
-
Maxima
a(n):=2*sum((binomial(2*m+1,m)*binomial(n-1,2*m-1))/(m+2),m,1,n/2); /* Vladimir Kruchinin, Jan 24 2022 */
Formula
G.f.: (-1 + (1-z)^2 * M^2), with M the g.f. of the Motzkin numbers (A001006). [corrected by Vaclav Kotesovec, Sep 17 2019]
Conjecture: (n+4)*a(n) +(-3*n-5)*a(n-1) +(-n-6)*a(n-2) +3*(n-3)*a(n-3)=0. - R. J. Mathar, Jun 23 2013
a(n) ~ 4 * 3^(n + 1/2) / (sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Sep 17 2019
a(n) = 2*Sum_{m=1..n/2} C(2*m+1,m)*C(n-1,2*m-1)/(m+2). - Vladimir Kruchinin, Jan 24 2022