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 A324621 #13 Oct 28 2021 09:27:19 %S A324621 0,1,1,7,31,185,1275,10095,90109,895169,9793829,116998199,1515196619, %T A324621 21143666585,316260079951,5047672782687,85623656678457, %U A324621 1538245254809537,29176112648650441,582614412521648359,12217688610474042487,268445509189890555577 %N A324621 Number of permutations p of [1+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(1+n)*[i<p(i)]]. %H A324621 Alois P. Heinz, <a href="/A324621/b324621.txt">Table of n, a(n) for n = 0..449</a> %F A324621 a(n) = A000166(n+1) - A000179(n+1) for n < 0, a(0) = 0. %p A324621 a:= proc(n) option remember; `if`(n<5, [0, 1$2, 7, 31][n+1], %p A324621 ((2*n^4-3*n^3-2*n^2+n+4)*a(n-1) -(n^5-4*n^4+7*n^2+6*n-14)* %p A324621 a(n-2) -(n^5-2*n^4-4*n^3+2*n^2+13*n-12)*a(n-3)-(n-2)* %p A324621 (n^3+2*n^2+n-2)*a(n-4))/(n^3-n^2-2)) %p A324621 end: %p A324621 seq(a(n), n=0..23); %t A324621 menage[n_] := If[n == 0, 1, 2n Sum[(-1)^k Binomial[2n-k, k] (n-k)!/(2n-k), {k, 0, n}]]; %t A324621 a[n_] := If[n == 0, 0, Subfactorial[n+1] - menage[n+1]]; %t A324621 a /@ Range[0, 21] (* _Jean-François Alcover_, Oct 28 2021 *) %Y A324621 Row n=1 of A324563 and column of A324564 (as array). %Y A324621 Cf. A000166, A000179. %K A324621 nonn %O A324621 0,4 %A A324621 _Alois P. Heinz_, Mar 09 2019