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, 7235039300, 26840154388, 101944730262, 392596623714, 1530559274958, 6072449285528, 24470393750806, 100062786402800
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
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
AUTHOR
Rémy Sigrist, Oct 25 2020
EXTENSIONS
More terms from Bert Dobbelaere, Apr 12 2026
STATUS
approved