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 A046740 #22 Mar 08 2020 00:51:52 %S A046740 1,1,1,2,1,8,2,1,22,28,2,1,52,182,72,2,1,114,864,974,164,2,1,240,3474, %T A046740 8444,4174,352,2,1,494,12660,57194,61464,15782,732,2,1,1004,43358, %U A046740 332528,660842,373940,55286,1496,2,1,2026,142552,1747558,5814124 %N A046740 Triangle of number of permutations of [n] with 0 successions, by number of rises. %C A046740 The recurrence given by Roselle is wrong. %H A046740 D. P. Roselle, <a href="https://dx.doi.org/10.1090/S0002-9939-1968-0218256-9">Permutations by number of rises and successions</a>, Proc. Amer. Math. Soc., 19 (1968), 8-16. %H A046740 D. P. Roselle, <a href="/A046739/a046739.pdf">Permutations by number of rises and successions</a>, Proc. Amer. Math. Soc., 19 (1968), 8-16. [Annotated scanned copy] %F A046740 a(n, 1) = 1; for r > 1, a(n, r) = r*a(n-1, r) + (n-r)*a(n-1, r-1) + (n-2)*a(n-2, r-1). %F A046740 a(n, 2) = 2^n - 2*n = 2*A000295 = A005803, n >= 3. %e A046740 Triangle begins: %e A046740 1; %e A046740 1; %e A046740 1, 2; %e A046740 1, 8, 2; %e A046740 1, 22, 28, 2; %e A046740 ... %t A046740 a[_, 1] = 1; a[n_, 2] := 2^n - 2*n; a[n_, r_] /; 1 <= r <= n-1 := a[n, r] = r*a[n-1, r] + (n-r)*a[n-1, r-1] + (n-2)*a[n-2, r-1]; a[_, _] = 0; %t A046740 row[1] = {{1}}; row[n_] := Table[a[n, r], {r, 1, n-1}]; %t A046740 Table[row[n], {n, 1, 11}] // Flatten (* _Jean-François Alcover_, Sep 07 2017 *) %Y A046740 Cf. A046739, A000295. Row sums give A000255. Diagonals give A005803, A065340. %Y A046740 Row sums give A000255. %K A046740 nonn,easy,nice,tabf %O A046740 1,4 %A A046740 _N. J. A. Sloane_ %E A046740 More terms from _Vladeta Jovovic_, Jan 03 2003