OFFSET
0,4
COMMENTS
Ballot sequences B have positive terms, and for any finite prefix P of B and any k > 0, the number of occurrences of k in P is greater than or equal to the number of occurrences of k+1 in P.
LINKS
Rémy Sigrist, C++ program for A338418
FORMULA
a(n) >= A338417(n).
EXAMPLE
For n = 5:
- the reversals of the following length-5 ballot sequences are also ballot sequences:
(1, 1, 1, 1, 1)
(1, 1, 1, 2, 1)
(1, 1, 2, 1, 1)
(1, 2, 1, 1, 1)
(1, 2, 1, 2, 1)
- so a(5) = 5.
PROG
(C++) See Links section.
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Rémy Sigrist, Oct 25 2020
STATUS
approved