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

%I #26 Oct 06 2021 12:57:35

%S 0,0,1,1,3,8,24,74,246,848,3088,11644,45844,186336,784928,3403128,

%T 15212744,69802944,328988096,1587831568,7848954928,39651793024,

%U 204691645824,1078028406176,5790745961568,31687186373888,176575788105984,1001061518465984,5771865641210176

%N Number of ballot sequences of length n with exactly 2 fixed points.

%C The fixed points are in the first 2 positions.

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

%H Joerg Arndt and Alois P. Heinz, <a href="/A238977/b238977.txt">Table of n, a(n) for n = 0..800</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Young_tableau">Young tableau</a>

%F See Maple program.

%F 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

%F 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

%F From _Peter Bala_, Oct 05 2021: (Start)

%F a(n) = (1/3)*( A000085(n) - A000085(n-3) ) for n >= 3.

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

%F 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)

%e a(2) = 1: [1,2].

%e a(3) = 1: [1,2,1].

%e a(4) = 3: [1,2,1,1], [1,2,1,2], [1,2,1,3].

%e 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].

%p a:= proc(n) option remember; `if`(n<3, n*(n-1)/2,

%p ((3*n^2+3*n-33)*a(n-1) +(n-4)*(10*n^2-27*n-6)*a(n-2)

%p +(n-4)*(n-5)*(7*n-18)*a(n-3)) / (10*n^2-64*n+105))

%p end:

%p seq(a(n), n=0..40);

%t 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 *)

%Y Column k=2 of A238802.

%Y Cf. A000085, A007310.

%K nonn,easy

%O 0,5

%A _Joerg Arndt_ and _Alois P. Heinz_, Mar 07 2014

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 April 16 00:27 EDT 2024. Contains 371696 sequences. (Running on oeis4.)