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 A317130 #17 Apr 29 2020 05:17:03 %S A317130 1,1,1,2,7,24,93,483,2832,17515,123226,978405,8312802,75966887, %T A317130 756376739,8070649675,91320842018,1099612368110,14054043139523, %U A317130 189320856378432,2682416347625463,39945105092501742,623240458310527252,10160826473676346731,172871969109661492526 %N A317130 Number of permutations of [n] whose lengths of increasing runs are triangular numbers. %H A317130 Alois P. Heinz, <a href="/A317130/b317130.txt">Table of n, a(n) for n = 0..400</a> %e A317130 a(2) = 1: 21. %e A317130 a(3) = 2: 123, 321. %e A317130 a(4) = 7: 1243, 1342, 2134, 2341, 3124, 4123, 4321. %e A317130 a(5) = 24: 12543, 13542, 14532, 21354, 21453, 23541, 24531, 31254, 31452, 32145, 32451, 34521, 41253, 41352, 42135, 42351, 43125, 51243, 51342, 52134, 52341, 53124, 54123, 54321. %p A317130 g:= n-> `if`(issqr(8*n+1), 1, 0): %p A317130 b:= proc(u, o, t) option remember; `if`(u+o=0, g(t), %p A317130 `if`(g(t)=1, add(b(u-j, o+j-1, 1), j=1..u), 0)+ %p A317130 add(b(u+j-1, o-j, t+1), j=1..o)) %p A317130 end: %p A317130 a:= n-> b(n, 0$2): %p A317130 seq(a(n), n=0..27); %t A317130 g[n_] := If[IntegerQ @ Sqrt[8n+1], 1, 0]; %t A317130 b[u_, o_, t_] := b[u, o, t] = If[u+o==0, g[t], If[g[t]==1, Sum[b[u-j, o+j-1, 1], {j, 1, u}], 0] + Sum[b[u+j-1, o-j, t+1], {j, 1, o}]]; %t A317130 a[n_] := b[n, 0, 0]; %t A317130 a /@ Range[0, 27] (* _Jean-François Alcover_, Apr 29 2020, after _Alois P. Heinz_ *) %Y A317130 Cf. A000217, A097597, A193374, A317111, A317128, A317129, A317131, A317132, A317446. %K A317130 nonn %O A317130 0,4 %A A317130 _Alois P. Heinz_, Jul 21 2018