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, PARI program for A338417
FORMULA
a(n) <= A338418(n).
EXAMPLE
For n = 5:
- the following length-5 ballot sequences are palindromic:
(1, 1, 1, 1, 1)
(1, 1, 2, 1, 1)
(1, 2, 1, 2, 1)
- so a(5) = 3.
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Oct 25 2020
EXTENSIONS
a(35)-a(44) from Bert Dobbelaere, Oct 31 2020
STATUS
approved