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 A317448 #13 Jul 14 2021 06:27:34 %S A317448 1,1,1,4,0,0,1,12,54,1002,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,48,648,39444, %T A317448 0,0,1187548,96978608,1721374454,169149221140,0,0,0,0,0,0,0,0,0,0,0,0, %U A317448 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 %N A317448 Number of permutations of [n] whose lengths of increasing runs are distinct factorial numbers. %H A317448 Alois P. Heinz, <a href="/A317448/b317448.txt">Table of n, a(n) for n = 0..721</a> %F A317448 a(n) = 0 <=> n in { A115945 }. %F A317448 a(n) > 0 <=> n in { A059590 }. %p A317448 h:= proc(n) local i; 1; for i from 2 do %p A317448 if n=% then 1; break elif n<% then 0; break fi; %p A317448 %*i od; h(n):=% %p A317448 end: %p A317448 g:= (n, s)-> `if`(n in s or not (n=0 or h(n)=1), 0, 1): %p A317448 b:= proc(u, o, t, s) option remember; `if`(u+o=0, g(t, s), %p A317448 `if`(g(t, s)=1, add(b(u-j, o+j-1, 1, s union {t}) %p A317448 , j=1..u), 0)+ add(b(u+j-1, o-j, t+1, s), j=1..o)) %p A317448 end: %p A317448 a:= n-> b(n, 0$2, {}): %p A317448 seq(a(n), n=0..34); %t A317448 h[n_] := Module[{i, pc = 1}, For[i = 2, True, i++, Which[n == pc, pc = 1; Break[], n < pc, pc = 0; Break[]]; pc = pc*i]; h[n] = pc]; %t A317448 g[n_, s_] := If[MemberQ[s, n] || !(n == 0 || h[n] == 1), 0, 1]; %t A317448 b[u_, o_, t_, s_] := b[u, o, t, s] = If[u + o == 0, g[t, s], %t A317448 If[g[t, s] == 1, Sum[b[u - j, o + j - 1, 1, s ~Union~ {t}], %t A317448 {j, 1, u}], 0] + Sum[b[u + j - 1, o - j, t + 1, s], {j, 1, o}]]; %t A317448 a[n_] := b[n, 0, 0, {}]; %t A317448 Table[a[n], {n, 0, 34}] (* _Jean-François Alcover_, Jul 14 2021, after _Alois P. Heinz_ *) %Y A317448 Cf. A000142, A059590, A115945, A317132, A317444, A317445, A317446, A317447. %K A317448 nonn %O A317448 0,4 %A A317448 _Alois P. Heinz_, Jul 28 2018