login
A338418
a(n) is the number of length-n ballot sequences whose reversals are also ballot sequences.
2
1, 1, 1, 2, 3, 5, 11, 23, 50, 118, 283, 731, 1921, 5370, 14884, 43118, 130509, 397490, 1266010, 4077494, 13435445, 45687806, 157483627, 551205779, 1979511990
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.
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