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 A325923 #13 Aug 09 2019 08:42:19 %S A325923 0,0,0,1,5,18,56,163,459,1286,3640,10479,30659,90738,270092,804833, %T A325923 2393929,7098790,20984188,61872587,182130495,535698422,1575478728, %U A325923 4635125097,13645054833,40196623234,118493318904,349506908369,1031426887149 %N A325923 Number of Motzkin meanders of length n with an odd number of humps and an even number of peaks. %C A325923 A Motzkin meander is a lattice path with steps from the set {D=-1, H=0, U=1} that starts at (0,0), and never goes below the x-axis. %C A325923 A peak is an occurrence of the pattern UD. %C A325923 A hump is an occurrence of the pattern UHH...HD (the number of Hs in the pattern is not fixed, and can be 0). %H A325923 Andrei Asinowski, Axel Bacher, Cyril Banderier, Bernhard Gittenberger, <a href="https://lipn.univ-paris13.fr/~banderier/Papers/patterns2019.pdf">Analytic combinatorics of lattice paths with forbidden patterns, the vectorial kernel method, and generating functions for pushdown automata</a>, Algorithmica (2019). %F A325923 G.f.: ( (-3*t^2+4*t+sqrt(-3*t^4+4*t^3+2*t^2-4*t+1)-1)/(3*t^2-4*t+1) + (2*t^3-5*t^2+4*t+sqrt(4*t^6-12*t^5+13*t^4-8*t^3+6*t^2-4*t+1)-1)/(-2*t^3+5*t^2-4*t+1) - (-5*t^2+4*t+sqrt(5*t^4-4*t^3+6*t^2-4*t+1)-1)/(5*t^2-4*t+1) - (-2*t^3-3*t^2+4*t+sqrt(4*t^6+4*t^5-11*t^4+8*t^3+2*t^2-4*t+1)-1)/(2*t^3+3*t^2-4*t+1) ) / (8*t). %F A325923 a(n) ~ 3^(n + 1/2) / (4*sqrt(Pi*n)). - _Vaclav Kotesovec_, Aug 09 2019 %e A325923 For n = 4 the a(4) = 5 paths are UHDU, UHDH, UUHD, HUHD, UHHD: in all these paths, 0 peaks, 1 hump. %e A325923 For n=0..6 we have only paths with 0 peaks and 1 hump. %e A325923 For n=7, we have a(7)=163. Among them, 160 paths with 0 peaks and 1 hump, and 3 walks with 2 peaks and 3 humps: UDUDUHD, UDUHDUD, UHDUDUD. %p A325923 b:= proc(x, y, t, p, h) option remember; `if`(x=0, `if`(p+1=h, 1, 0), %p A325923 `if`(y>0, b(x-1, y-1, 0, irem(p+`if`(t=1, 1, 0), 2), irem(h+ %p A325923 `if`(t=2, 1, 0), 2)), 0)+b(x-1, y, `if`(t>0, 2, 0), p, h)+ %p A325923 b(x-1, y+1, 1, p, h)) %p A325923 end: %p A325923 a:= n-> b(n, 0$4): %p A325923 seq(a(n), n=0..35); # _Alois P. Heinz_, Jul 04 2019 %t A325923 CoefficientList[Series[((-1 + 4*x - 3*x^2 + Sqrt[(-(-1 + x)^2)*(-1 + 2*x + 3*x^2)])/ (1 - 4*x + 3*x^2) - (-1 + 4*x - 5*x^2 + 2*x^3 + Sqrt[(-1 + x)^3*(-1 + x + 4*x^3)])/ ((-1 + x)^2*(-1 + 2*x)) + (1 - 4*x + 5*x^2 - Sqrt[1 - 4*x + 6*x^2 - 4*x^3 + 5*x^4])/(1 - 4*x + 5*x^2) + (1 - 4*x + 3*x^2 + 2*x^3 - Sqrt[1 - 4*x + 2*x^2 + 8*x^3 - 11*x^4 + 4*x^5 + 4*x^6])/(1 - 4*x + 3*x^2 + 2*x^3)) / (8*x), {x, 0, 40}], x] (* _Vaclav Kotesovec_, Aug 09 2019 *) %Y A325923 Cf. A325921. %K A325923 nonn %O A325923 0,5 %A A325923 _Andrei Asinowski_, Jul 04 2019