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 A097900 #35 Jul 14 2025 09:59:52 %S A097900 1,2,7,32,180,1200,9240,80640,786240,8467200,99792000,1277337600, %T A097900 17643225600,261534873600,4140968832000,69742632960000, %U A097900 1244905998336000,23475370254336000,466306218233856000,9731608032706560000 %N A097900 Number of runs of length 1 in all permutations of [n]. (The permutation 3574162 has two runs of length 1: 357/4/16/2.) %C A097900 a(n) is the number of corners in the set of tree-like tableaux of size n (see Gao et al. link). - _Michel Marcus_, Nov 18 2015 %H A097900 G. C. Greubel, <a href="/A097900/b097900.txt">Table of n, a(n) for n = 1..445</a> %H A097900 Alice L.L. Gao, Emily X.L. Gao, Patxi Laborde-Zubieta, and Brian Y. Sun, <a href="http://arxiv.org/abs/1511.05456"> Enumeration of Corners in Tree-like Tableaux</a>, arXiv:1511.05456 [math.CO], 2016. %H A097900 Ira M. Gessel, <a href="http://hdl.handle.net/1721.1/16342">Generating functions and enumeration of sequences</a>, Ph. D. Thesis, MIT, 1977. %F A097900 a(n) = n!*(n+4)/6 for n >= 2. %F A097900 E.g.f.: x*(6-6*x+x^2)/(6*(1-x)^2). %F A097900 a(n) = (A159920(n)*(n-2)!)/ 2 for n >= 2. - _Cullen M. Vaney_, Jul 14 2025 %e A097900 a(3) = 7 because there are 7 runs of length 1 in the permutations 123, 13(2), (2)13, 23(1), (3)12, (3)(2)(1) (shown between parentheses). %p A097900 seq(ceil(n!*(n+4)/6),n=1..23); %t A097900 Join[{1}, Table[n! (n + 4)/6, {n, 2, 20}]] (* _Vincenzo Librandi_, Nov 18 2015 *) %t A097900 Rest[With[{nmax = 50}, CoefficientList[Series[x*(6 - 6*x + x^2)/(6*(1 - x)^2), {x, 0, nmax}], x]*Range[0, nmax]!]] (* _G. C. Greubel_, Dec 20 2017 *) %o A097900 (Magma) [1] cat [Factorial(n)*(n+4)/6: n in [2..25]]; // _Vincenzo Librandi_, Nov 18 2015 %o A097900 (PARI) my(x='x+O('x^30)); Vec(serlaplace(x*(6-6*x+x^2)/(6*(1-x)^2))) \\ _G. C. Greubel_, Dec 20 2017 %o A097900 (PARI) a(n) = if(n==1, 1, n!*(n+4)/6); \\ _Altug Alkan_, Dec 21 2017 %Y A097900 Cf. A159920. %K A097900 nonn,easy %O A097900 1,2 %A A097900 _Emeric Deutsch_ and _Ira M. Gessel_, Sep 03 2004