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 A162986 #9 Oct 19 2022 17:33:01 %S A162986 1,0,1,1,0,1,1,2,0,1,2,2,3,0,1,4,5,3,4,0,1,8,10,9,4,5,0,1,17,21,18,14, %T A162986 5,6,0,1,37,46,40,28,20,6,7,0,1,82,102,90,66,40,27,7,8,0,1,185,230, %U A162986 204,152,100,54,35,8,9,0,1,423,526,469,353,235,143,70,44,9,10,0,1,978,1216 %N A162986 Number of Dyck paths with no UUU's and no DDD's of semilength n and having k UD's starting at level 0 (i.e., hills); (0 <= k <= n; U=(1,1), D=(1,-1)). %C A162986 T is the convolution triangle based on T(n,0) = A004148(n-1) (n >= 1). - _Peter Luschny_, Oct 19 2022 %F A162986 G(t,z) = 1/(1 - tz - z^2 - z^3*g), where g = 1 + zg + z^2*g + z^3*g^2. %F A162986 Sum of entries in row n = A004148(n+1) (the secondary structure numbers). %F A162986 T(n,0) = A004148(n-1) (n>=1). %F A162986 Sum_{k=0..n} k*T(n,k) = A162987(n). %e A162986 T(5,2)=3 because we have (UD)(UD)UUDUDD, (UD)UUDUDD(UD), and UUDUDD(UD)(UD) (the hills are placed between parentheses). %e A162986 Triangle starts: %e A162986 1; %e A162986 0, 1; %e A162986 1, 0, 1; %e A162986 1, 2, 0, 1; %e A162986 2, 2, 3, 0, 1; %e A162986 4, 5, 3, 4, 0, 1; %p A162986 g := ((1-z-z^2-sqrt(1-2*z-z^2-2*z^3+z^4))*1/2)/z^3: G := 1/(1-t*z-z^2-z^3*g): Gser := simplify(series(G, z = 0, 16)): for n from 0 to 12 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 12 do seq(coeff(P[n], t, j), j = 0 .. n) end do; # yields sequence in triangular form %p A162986 # Alternative based on a modified form of A004148: %p A162986 # Uses function PMatrix from A357368. Adds column 1,0,0,0,... to the left. %p A162986 M004148 := n -> `if`(n<3, 2-n, hypergeom([(2-n)/2, (3-n)/2, (3-n)/2, (4-n)/2], [2, 2-n, 3-n], 16)): %p A162986 PMatrix(10, n -> simplify(M004148(n))); # _Peter Luschny_, Oct 19 2022 %Y A162986 Cf. A004148, A162987. %K A162986 nonn,tabl %O A162986 0,8 %A A162986 _Emeric Deutsch_, Oct 11 2009