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 A226995 #19 Nov 03 2024 04:33:30 %S A226995 1,2,6,23,103,504,2588,13661,73373,398814,2186818,12072275,67004451, %T A226995 373532596,2089994360,11730304377,66012996217,372350924666, %U A226995 2104523577534,11916013288271,67576932913951,383781666337072,2182362613988116,12424357722805333 %N A226995 Number of lattice paths from (0,0) to (n,n) consisting of steps U=(1,1), H=(1,0) and S=(0,1) such that the first step leaving the diagonal (if any) is an H step and the last step joining the diagonal (if any) is a S step. %H A226995 Alois P. Heinz, <a href="/A226995/b226995.txt">Table of n, a(n) for n = 0..1000</a> %F A226995 G.f.: x/((x-1)^2*sqrt(x^2-6*x+1)) - 1/(x-1). %F A226995 a(n) ~ (3+2*sqrt(2))^(n+1/2)/(2^(3+1/4)*sqrt(Pi*n)). - _Vaclav Kotesovec_, Jun 27 2013 %e A226995 a(0) = 1: the empty path. %e A226995 a(1) = 2: HS, U. %e A226995 a(2) = 6: HHSS, HSHS, HSU, HUS, UHS, UU. %e A226995 a(3) = 23: HHHSSS, HHSHSS, HHSSHS, HHSSU, HHSUS, HHUSS, HSHHSS, HSHSHS, HSHSU, HSHUS, HSSHHS, HSUHS, HSUU, HUHSS, HUSHS, HUSU, HUUS, UHHSS, UHSHS, UHSU, UHUS, UUHS, UUU. %p A226995 a:= proc(n) option remember; `if`(n<4, [1, 2, 6, 23][n+1], %p A226995 ((8*n-11)*a(n-1) +(21-14*n)*a(n-2) %p A226995 +(8*n-13)*a(n-3) -(n-2)*a(n-4))/ (n-1)) %p A226995 end: %p A226995 seq(a(n), n=0..25); %t A226995 CoefficientList[Series[x/((x-1)^2*Sqrt[x^2-6*x+1]) - 1/(x-1), {x, 0, 20}], x] (* _Vaclav Kotesovec_, Jun 27 2013 *) %Y A226995 Cf. A001850 (unrestricted paths), A006318 (subdiagonal paths), A226994, A226996. %K A226995 nonn %O A226995 0,2 %A A226995 _Alois P. Heinz_, Jun 26 2013