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 A317445 #13 Jul 27 2021 07:50:38 %S A317445 1,1,0,0,1,8,0,0,0,1,18,0,0,1428,47998,0,1,32,0,0,9688,505056,0,0,0, %T A317445 4085949,284958912,0,0,290824632172,28643427712626,0,0,0,104902510, %U A317445 9998016202,1,72,23207824626842,3008268832634364,182778,206173972520,24290829974718,0 %N A317445 Number of permutations of [n] whose lengths of increasing runs are distinct squares. %H A317445 Alois P. Heinz, <a href="/A317445/b317445.txt">Table of n, a(n) for n = 0..200</a> %F A317445 a(n) = 0 <=> n in { A001422 }. %F A317445 a(n) > 0 <=> n in { A003995 }. %p A317445 g:= (n, s)-> `if`(n in s or not issqr(n), 0, 1): %p A317445 b:= proc(u, o, t, s) option remember; `if`(u+o=0, g(t, s), %p A317445 `if`(g(t, s)=1, add(b(u-j, o+j-1, 1, s union {t}) %p A317445 , j=1..u), 0)+ add(b(u+j-1, o-j, t+1, s), j=1..o)) %p A317445 end: %p A317445 a:= n-> b(n, 0$2, {}): %p A317445 seq(a(n), n=0..50); %t A317445 g[n_, s_] := If[MemberQ[s, n] || !IntegerQ@Sqrt[n], 0, 1]; %t A317445 b[u_, o_, t_, s_] := b[u, o, t, s] = If[u + o == 0, g[t, s], %t A317445 If[g[t, s] == 1, Sum[b[u - j, o + j - 1, 1, s ~Union~ {t}], %t A317445 {j, 1, u}], 0] + Sum[b[u + j - 1, o - j, t + 1, s], {j, 1, o}]]; %t A317445 a[n_] := b[n, 0, 0, {}]; %t A317445 Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Jul 24 2021, after _Alois P. Heinz_ *) %Y A317445 Cf. A000290, A001422, A003995, A317129, A317444, A317446, A317447, A317448. %K A317445 nonn %O A317445 0,6 %A A317445 _Alois P. Heinz_, Jul 28 2018