|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|