cp's OEIS Frontend

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.

A138364 The number of Motzkin n-paths with exactly one flat step.

This page as a plain text file.
%I A138364 #60 Aug 26 2025 00:40:37
%S A138364 0,1,0,3,0,10,0,35,0,126,0,462,0,1716,0,6435,0,24310,0,92378,0,352716,
%T A138364 0,1352078,0,5200300,0,20058300,0,77558760,0,300540195,0,1166803110,0,
%U A138364 4537567650,0,17672631900,0,68923264410,0,269128937220,0
%N A138364 The number of Motzkin n-paths with exactly one flat step.
%C A138364 An aerated version of A001700, which is the main entry for this sequence.
%C A138364 Number of paths in the half-plane x>=0, from (0,0) to (n,1), and consisting of steps U=(1,1) and D=(1,-1). For example, for n=3, we have the 3 paths: UUD, UDU, DUU. - _José Luis Ramírez Ramírez_, Apr 19 2015
%D A138364 Jerome Spanier and Keith B. Oldham, "Atlas of Functions", Ch. 49, Hemisphere Publishing Corp., 1999.
%H A138364 G. C. Greubel, <a href="/A138364/b138364.txt">Table of n, a(n) for the first 50 rows, flattened</a>
%H A138364 Kiran S. Kedlaya and Andrew V. Sutherland, <a href="http://dspace.mit.edu/handle/1721.1/64701">Hyperelliptic Curves, L-Polynomials, and Random Matrices</a>. In: Arithmetic, Geometry, Cryptography, and Coding Theory: International Conference, November 5-9, 2007, CIRM, Marseilles, France. (Contemporary Mathematics; v.487)
%F A138364 a(n) = binomial(n,(n+1)/2) for n odd, 0 otherwise.
%F A138364 E.g.f.: I_1(2z), where I_1 is the hyperbolic Bessel function of order 1.
%F A138364 a(n) = (1/(2*Pi))*integral(x=-2..2, x^n*x/sqrt((2+x)*(2-x))). - _Peter Luschny_, Sep 12 2011
%F A138364 G.f.: -(sqrt(1-4*x^2)+2*x^2-1)/(x*sqrt(1-4*x^2)+4*x^3-x). - _Vladimir Kruchinin_, Mar 08 2013
%F A138364 a(n) + A126120(n) = A057977(n). - _Peter Luschny_, Mar 18 2014
%F A138364 G.f.: z*C(z^2)/(1-2*z^2*C(z^2)), where C(z) is the g.f. of Catalan numbers. - _José Luis Ramírez Ramírez_, Apr 19 2015
%F A138364 a(n) = Integral_[-Pi,Pi] cos^(n+1)/(2^(n-1)*Pi). - _M. F. Hasler_, Jul 12 2018
%e A138364 a(5)=10 since the coefficient of z^5 in I_1(2z) is binomial(5,3)=10.
%t A138364 a[ n_] := SeriesCoefficient[ n! BesselI[ 1, 2 x], {x, 0, n}]; (* _Michael Somos_, Mar 19 2014 *)
%o A138364 (PARI) x='x+O('x^66); concat([0], Vec( -(sqrt(1-4*x^2)+2*x^2-1) / (x*sqrt(1-4*x^2)+4*x^3-x))) \\ _Joerg Arndt_, May 08 2013
%o A138364 (Sage)
%o A138364 def A138364(n):
%o A138364     if is_even(n): return 0
%o A138364     return binomial(n,n//2)
%o A138364 [A138364(n) for n in (0..42)]  # _Peter Luschny_, Mar 18 2014
%o A138364 (Magma) &cat[[0, Binomial(n, (n+1) div 2)]: n in [1..50 by 2]]; // _Vincenzo Librandi_, Apr 20 2015
%o A138364 (Python)
%o A138364 from math import comb
%o A138364 def A138364(n): return comb(n,n>>1) if n&1 else 0 # _Chai Wah Wu_, Aug 25 2025
%Y A138364 Cf. A001700, A057977, A126869.
%K A138364 easy,nonn,changed
%O A138364 0,4
%A A138364 _Andrew V. Sutherland_, Mar 16 2008
%E A138364 New name is a comment by _David Scambler_, May 02 2013. - _Peter Luschny_, Mar 18 2014