login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238977 Number of ballot sequences of length n with exactly 2 fixed points. 2
0, 0, 1, 1, 3, 8, 24, 74, 246, 848, 3088, 11644, 45844, 186336, 784928, 3403128, 15212744, 69802944, 328988096, 1587831568, 7848954928, 39651793024, 204691645824, 1078028406176, 5790745961568, 31687186373888, 176575788105984, 1001061518465984, 5771865641210176 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
The fixed points are in the first 2 positions.
Also the number of standard Young tableaux with n cells such that the first column contains 1 and 2, but not 3. An alternate definition uses the first row.
LINKS
Joerg Arndt and Alois P. Heinz, Table of n, a(n) for n = 0..800
Wikipedia, Young tableau
FORMULA
See Maple program.
a(n) ~ sqrt(2)/6 * exp(sqrt(n)-n/2-1/4) * n^(n/2) * (1 + 7/(24*sqrt(n))). - Vaclav Kotesovec, Mar 07 2014
Recurrence (for n>=4): (n-3)*(n^2 - 6*n + 11)*a(n) = (n^3 - 9*n^2 + 32*n - 39)*a(n-1) + (n-4)*(n-2)*(n^2 - 4*n + 6)*a(n-2). - Vaclav Kotesovec, Mar 08 2014
From Peter Bala, Oct 05 2021: (Start)
a(n) = (1/3)*( A000085(n) - A000085(n-3) ) for n >= 3.
a(n) = (1/3)*Sum_{k = 0..floor(n/2)} (1 - binomial(n-2*k,3)/binomial(n,3))* binomial(n,2*k) * (2*k)!/(2^k*k!) for n >= 3.
Conjecture: a(n+3) == 1 (mod n) iff n is coprime to 2 and 3, that is, iff n is a term of A007310. (End)
EXAMPLE
a(2) = 1: [1,2].
a(3) = 1: [1,2,1].
a(4) = 3: [1,2,1,1], [1,2,1,2], [1,2,1,3].
a(5) = 8: [1,2,1,1,1], [1,2,1,1,2], [1,2,1,1,3], [1,2,1,2,1], [1,2,1,2,3], [1,2,1,3,1], [1,2,1,3,2], [1,2,1,3,4].
MAPLE
a:= proc(n) option remember; `if`(n<3, n*(n-1)/2,
((3*n^2+3*n-33)*a(n-1) +(n-4)*(10*n^2-27*n-6)*a(n-2)
+(n-4)*(n-5)*(7*n-18)*a(n-3)) / (10*n^2-64*n+105))
end:
seq(a(n), n=0..40);
MATHEMATICA
b[n_, l_List] := b[n, l] = If[n <= 0, 1, b[n - 1, Append[l, 1]] + Sum[If[i == 1 || l[[i - 1]] > l[[i]], b[n - 1, ReplacePart[l, i -> l[[i]] + 1]], 0], {i, 1, Length[l]}]]; a[n_] := b[n - 3, {2, 1}]; a[0] = a[1] = 0; Table[Print["a(", n, ") = ", an = a[n]]; an, {n, 0, 40}] (* Jean-François Alcover, Feb 06 2015, after Maple *)
CROSSREFS
Column k=2 of A238802.
Sequence in context: A303607 A281872 A046342 * A182453 A047087 A000958
KEYWORD
nonn,easy
AUTHOR
Joerg Arndt and Alois P. Heinz, Mar 07 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 08:59 EDT 2024. Contains 371268 sequences. (Running on oeis4.)