login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A287966 Number of Dyck paths of semilength n such that no level has more than two peaks. 2
1, 1, 2, 4, 12, 31, 90, 264, 797, 2402, 7355, 22725, 70573, 220007, 688379, 2160568, 6798020, 21428295, 67644503, 213806475, 676499166, 2142338437, 6789119425, 21527297986, 68292751071, 216737768906, 688082702872, 2185085230180, 6940609839680, 22050162168754 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
Manosij Ghosh Dastidar and Michael Wallner, Bijections and congruences involving lattice paths and integer compositions, arXiv:2402.17849 [math.CO], 2024. See p. 19.
FORMULA
a(n) = A287847(n,2).
a(n) = A000108(n) for n <= 2.
MATHEMATICA
b[n_, k_, j_]:=b[n, k, j]=If[j==n, 1, Sum[b[n - j, k, i] Sum[Binomial[i, m] Binomial[j - 1, i - 1 - m], {m, Max[0, i - j], Min[k, i - 1]}], {i, Min[j + k, n - j]}]]; a[n_]:=If[n==0, 1, m=Min[n, 2]; Sum[b[n, m, j], {j, m}]]; Table[a[n], {n, 0, 50}] (* Indranil Ghosh, Aug 17 2017 *)
PROG
(Python)
from sympy.core.cache import cacheit
from sympy import binomial
@cacheit
def b(n, k, j): return 1 if j==n else sum(b(n - j, k, i)*sum(binomial(i, m)*binomial(j - 1, i - 1 - m) for m in range(max(0, i - j), min(k, i - 1) + 1)) for i in range(1, min(j + k, n - j) + 1))
def a(n):
if n==0: return 1
m=min(n, 2)
return sum(b(n, m , j) for j in range(1, m + 1))
print([a(n) for n in range(51)]) # Indranil Ghosh, Aug 17 2017
CROSSREFS
Column k=2 of A287847.
Cf. A000108.
Sequence in context: A148190 A151434 A296292 * A148191 A141312 A148192
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 03 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:39 EDT 2024. Contains 371963 sequences. (Running on oeis4.)