login
A338417
a(n) is the number of length-n palindromic ballot sequences.
2
1, 1, 1, 2, 1, 3, 3, 7, 4, 14, 9, 33, 29, 96, 64, 254, 163, 692, 466, 2140, 1697, 7284, 5161, 24421, 16456, 81892, 55698, 284924, 188134, 1047372, 785292, 4159714, 3015604, 16667771, 11495031, 66976871, 46966691, 275446751, 184362732, 1137178180, 767632663, 4898013187, 3510305457, 22233966251, 16073243746
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) <= 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
Sequence in context: A052959 A346473 A257702 * A034399 A005292 A183256
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Oct 25 2020
EXTENSIONS
a(35)-a(44) from Bert Dobbelaere, Oct 31 2020
STATUS
approved