login
a(n) is the number of length-n palindromic ballot sequences.
2

%I #15 Oct 31 2020 02:59:55

%S 1,1,1,2,1,3,3,7,4,14,9,33,29,96,64,254,163,692,466,2140,1697,7284,

%T 5161,24421,16456,81892,55698,284924,188134,1047372,785292,4159714,

%U 3015604,16667771,11495031,66976871,46966691,275446751,184362732,1137178180,767632663,4898013187,3510305457,22233966251,16073243746

%N a(n) is the number of length-n palindromic ballot sequences.

%C 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.

%H Rémy Sigrist, <a href="/A338417/a338417.gp.txt">PARI program for A338417</a>

%F a(n) <= A338418(n).

%e For n = 5:

%e - the following length-5 ballot sequences are palindromic:

%e (1, 1, 1, 1, 1)

%e (1, 1, 2, 1, 1)

%e (1, 2, 1, 2, 1)

%e - so a(5) = 3.

%o (PARI) See Links section.

%Y Cf. A000085, A338418.

%K nonn

%O 0,4

%A _Rémy Sigrist_, Oct 25 2020

%E a(35)-a(44) from _Bert Dobbelaere_, Oct 31 2020