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.

A140662 Number of possible column states for self-avoiding polygons in a slit of width n.

This page as a plain text file.
%I A140662 #23 Dec 06 2024 16:25:52
%S A140662 1,3,8,20,50,126,322,834,2187,5797,15510,41834,113633,310571,853466,
%T A140662 2356778,6536381,18199283,50852018,142547558,400763222,1129760414,
%U A140662 3192727796,9043402500,25669818475,73007772801,208023278208,593742784828,1697385471210,4859761676390
%N A140662 Number of possible column states for self-avoiding polygons in a slit of width n.
%C A140662 Number of Dyck (n+1)-paths whose maximum ascent length is 2. - _David Scambler_, Aug 22 2012
%C A140662 Number of (n+1)-Motzkin-paths with at least one up-step (see A001006 and the Python program). - _Peter Luschny_, Dec 03 2024
%H A140662 J. Alvarez, E.J. Janse van Rensburg et al. <a href="http://www.math.yorku.ca/Who/Faculty/Rensburg/Preprints/slits.pdf">Self-avoiding walks and polygons in slits</a>.
%H A140662 Xiaomei Chen, <a href="https://arxiv.org/abs/2412.00668">Counting humps and peaks in Motzkin paths with height k</a>, arXiv:2412.00668 [math.CO], 2024. See p. 7.
%H A140662 Louis Marin, <a href="https://arxiv.org/abs/2406.16413">Counting Polyominoes in a Rectangle b X h</a>, arXiv:2406.16413 [cs.DM], 2024. See p. 148.
%F A140662 a(n) = Sum_{m=1..[(n+1)/2]} (n+1)!/((n+1-2m)!m!(m+1)!).
%F A140662 a(n) = A001006(n + 1) - 1. [Corrected by _Peter Luschny_, Dec 03 2024]
%F A140662 D-finite with recurrence (n+3)*a(n) + (-4*n-7)*a(n-1) + (2*n+3)*a(n-2) + (4*n-5)*a(n-3) + 3*(-n+2)*a(n-4) = 0. - _R. J. Mathar_, Nov 01 2021
%F A140662 From _Peter Luschny_, Dec 03 2024: (Start)
%F A140662 a(n) = (1/2)*n*(n + 1)*hypergeom([1, -n/2 + 1, 1/2 - n/2], [2, 3], 4).
%F A140662 a(n) = n!*[x^n]((exp(x)*(-x^3 + 2*(2*x - 3)*x*BesselI(0,2*x) + (x*(5*x - 4) + 6)*BesselI(1, 2* x)))/x^3). (End)
%e A140662 The 20 Motzkin-paths of length 5 with at least one up-step are: UUDDF, UUDFD, UUFDD, UDUDF, UDUFD, UDFUD, UDFFF, UFUDD, UFDUD, UFDFF, UFFDF, UFFFD, FUUDD, FUDUD, FUDFF, FUFDF, FUFFD, FFUDF, FFUFD, FFFUD.
%p A140662 a := n -> n*(n + 1)*hypergeom([1, -n/2 + 1, 1/2 - n/2], [2, 3], 4)/2:
%p A140662 seq(simplify(a(n)), n = 1..30);  # _Peter Luschny_, Dec 03 2024
%o A140662 (Python)
%o A140662 # A generator of the Motzkin-paths with at least one up-step.
%o A140662 C = str.count
%o A140662 def aGen(n: int): # -> Generator[str, Any, list[str]]
%o A140662     a = [""]
%o A140662     for w in a:
%o A140662         if len(w) == n + 1:
%o A140662             if (C(w, "U") > 0 and C(w, "U") == C(w, "D")): yield w
%o A140662         else:
%o A140662             for j in "UDF":
%o A140662                 u = w + j
%o A140662                 if C(u, "U") >= C(u, "D"): a += [u]
%o A140662     return a
%o A140662 for n in range(1, 6):
%o A140662     SAP = [w for w in aGen(n)]
%o A140662     print(len(SAP), ":", SAP)  # _Peter Luschny_, Dec 03 2024
%Y A140662 Cf. A055151, A080159, A088617, A107131, A097610.
%Y A140662 Cf. A001006.
%Y A140662 Column k=2 of A203717 (shifted).
%K A140662 easy,nonn
%O A140662 1,2
%A A140662 _R. J. Mathar_, Jul 11 2008