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 A060158 #25 Dec 25 2024 15:49:54 %S A060158 0,0,0,0,0,32,300,1852,9576,45096,201060,866324,3650592,15154240, %T A060158 62260380,253939116,1030367448,4165106264,16790875860,67553807428, %U A060158 271383782544,1089035545968,4366631897100,17497971562460,70086163646280,280627369334152,1123357369925700 %N A060158 Number of permutations of [n] with 4 sequences. %D A060158 L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 261. %H A060158 Harry J. Smith, <a href="/A060158/b060158.txt">Table of n, a(n) for n = 0..200</a> %H A060158 E. Rodney Canfield and Herbert S. Wilf, <a href="https://arxiv.org/abs/math/0609704">Counting permutations by their runs up and down</a>, arXiv:math/0609704 [math.CO], 2006. [See u_4.] %H A060158 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (13, -67, 175, -244, 172, -48). %F A060158 a(n) = 2n - 7 + (6-n)*2^(n-1) - 3^n + 4^(n-1). %F A060158 G.f.: 4*x^5*(8-29*x+24*x^2)/((1-4*x)*(1-3*x)*(1-2*x)^2*(1-x)^2). %p A060158 n4 := n->2*n-7+(6-n)*2^(n-1)-3^n+4^(n-1); seq(n4(i),i=5..27); %t A060158 Join[{0, 0}, LinearRecurrence[{13, -67, 175, -244, 172, -48}, {0, 0, 0, 32, 300, 1852}, 25]] (* _Jean-François Alcover_, Sep 02 2018 *) %o A060158 (PARI) a(n) = { if (n<2, 0, 2*n - 7 + (6 - n)*2^(n - 1) - 3^n + 4^(n - 1)) } \\ _Harry J. Smith_, Jul 02 2009 %Y A060158 Cf. A028399, A060157, A000486, A059427, A000352, A123003. %K A060158 nonn %O A060158 0,6 %A A060158 Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Mar 12 2001 %E A060158 Edited by _N. J. A. Sloane_, Nov 11 2006