This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A238977 #26 Oct 06 2021 12:57:35 %S A238977 0,0,1,1,3,8,24,74,246,848,3088,11644,45844,186336,784928,3403128, %T A238977 15212744,69802944,328988096,1587831568,7848954928,39651793024, %U A238977 204691645824,1078028406176,5790745961568,31687186373888,176575788105984,1001061518465984,5771865641210176 %N A238977 Number of ballot sequences of length n with exactly 2 fixed points. %C A238977 The fixed points are in the first 2 positions. %C A238977 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 A238977 Joerg Arndt and Alois P. Heinz, <a href="/A238977/b238977.txt">Table of n, a(n) for n = 0..800</a> %H A238977 Wikipedia, <a href="https://en.wikipedia.org/wiki/Young_tableau">Young tableau</a> %F A238977 See Maple program. %F A238977 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 A238977 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 A238977 From _Peter Bala_, Oct 05 2021: (Start) %F A238977 a(n) = (1/3)*( A000085(n) - A000085(n-3) ) for n >= 3. %F A238977 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 A238977 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 A238977 a(2) = 1: [1,2]. %e A238977 a(3) = 1: [1,2,1]. %e A238977 a(4) = 3: [1,2,1,1], [1,2,1,2], [1,2,1,3]. %e A238977 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 A238977 a:= proc(n) option remember; `if`(n<3, n*(n-1)/2, %p A238977 ((3*n^2+3*n-33)*a(n-1) +(n-4)*(10*n^2-27*n-6)*a(n-2) %p A238977 +(n-4)*(n-5)*(7*n-18)*a(n-3)) / (10*n^2-64*n+105)) %p A238977 end: %p A238977 seq(a(n), n=0..40); %t A238977 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 A238977 Column k=2 of A238802. %Y A238977 Cf. A000085, A007310. %K A238977 nonn,easy %O A238977 0,5 %A A238977 _Joerg Arndt_ and _Alois P. Heinz_, Mar 07 2014