This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A026325 #30 Oct 06 2022 14:42:48 %S A026325 1,1,3,7,19,51,140,386,1071,2983,8338,23376,65715,185199,523134, %T A026325 1480872,4200411,11936619,33981063,96897759,276739029,791532973, %U A026325 2267119660,6502108902,18671460905,53680763201,154507444731,445190930863,1284064525987 %N A026325 Number of paths in the plane x >= 0 and y >= -2, from (0,0) to (n,0), and consisting of steps U = (1,1), D = (1,-1) and H = (1,0). %C A026325 Previous name: Number of (s(0), s(1), ..., s(n)) such that s(i) is a nonnegative integer and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, s(0) = 2, s(n) = 2. Also T(n,n), where T is the array in A026323. %C A026325 Number of paths in the plane x >= 0 and y >= -2, from (0,0) to (n,0), and consisting of steps U = (1,1), D = (1,-1) and H = (1,0). For example, for n=3, we have the 7 paths: HHH, UDH, HUD, UHD, HDU, DUH, DHU. - _José Luis Ramírez Ramírez_, Apr 20 2015 %H A026325 G. C. Greubel, <a href="/A026325/b026325.txt">Table of n, a(n) for n = 0..1000</a> %F A026325 G.f: 1/(1 - x - x^2*(M(x) + 1/(1 - x - x^2/(1 - x)))), where M(x) is g.f. of Motzkin paths A001006. - _José Luis Ramírez Ramírez_, Apr 20 2015 %F A026325 a(n) ~ 3^(n + 7/2)/(2*sqrt(Pi)*n^(3/2)). - _Vaclav Kotesovec_, Apr 21 2015 %F A026325 (n + 6)*a(n) + (-4*n - 15)*a(n-1) + (n - 3)*a(n-2) + 6*n*a(n-3) = 0. - _R. J. Mathar_, Jul 23 2017 %p A026325 gf := sqrt(4 - 8*x - 12*x^2)*(1/x^5 - 1/x^4 - 1/(4*x^6)): %p A026325 ser := series(gf,x,36): seq(coeff(ser, x, n), n=0..28); %p A026325 A026325 := proc(n) option remember; ifelse(n < 3, [1, 1, 3][n + 1], %p A026325 ((4*n+15)*A026325(n-1) + (3-n)*A026325(n-2) - 6*n*A026325(n-3))/(n+6)) end: %p A026325 seq(A026325(n), n = 0..28); # _Peter Luschny_, Oct 06 2022 %t A026325 CoefficientList[Series[1/(1 - x - x^2 ((1 - x - (1 - 2 x - 3 x^2)^(1/2))/(2 x^2) + 1/(1 - x - x^2 / (1 - x)))), {x, 0, 40}], x] (* _Vincenzo Librandi_, Apr 21 2015 *) %o A026325 (PARI) x='x+O('x^50); Vec(1/(1 - x - x^2*((1 - x - (1 - 2*x - 3*x^2)^(1/2))/(2*x^2) + 1/(1 - x - x^2/(1 - x))))) \\ _G. C. Greubel_, Feb 15 2017 %Y A026325 Cf. A001006, A026327. %K A026325 nonn %O A026325 0,3 %A A026325 _Clark Kimberling_ %E A026325 New name using a comment of _José Luis Ramírez Ramírez_ by _Peter Luschny_, Oct 06 2022