cp's OEIS Frontend

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.

A317165 Number of permutations of [n*(n+1)/2] with distinct lengths of increasing runs.

This page as a plain text file.
%I A317165 #18 Sep 01 2021 22:23:14
%S A317165 1,1,5,241,188743,2734858573,892173483721887,7469920269852025033699,
%T A317165 1841449549508718383891930251607,
%U A317165 14973026148724796464136435753195418043885,4467880642339303169146446437381463615730321314015457,53810913396105573079543194840166969124601447333276658546225661505
%N A317165 Number of permutations of [n*(n+1)/2] with distinct lengths of increasing runs.
%F A317165 a(n) = A317166(A000217(n)).
%F A317165 a(n) >= A317273(n).
%p A317165 g:= (n, s)-> `if`(n in s, 0, 1):
%p A317165 b:= proc(u, o, t, s) option remember; `if`(u+o=0, g(t, s),
%p A317165       `if`(g(t, s)=1, add(b(u-j, o+j-1, 1, s union {t})
%p A317165        , j=1..u), 0)+ add(b(u+j-1, o-j, t+1, s), j=1..o))
%p A317165     end:
%p A317165 a:= n-> b(n*(n+1)/2, 0$2, {}):
%p A317165 seq(a(n), n=0..8);
%t A317165 g[n_, s_] := If[MemberQ[s, n], 0, 1];
%t A317165 b[u_, o_, t_, s_] := b[u, o, t, s] = If[u + o == 0, g[t, s],
%t A317165      If[g[t, s] == 1, Sum[b[u - j, o + j - 1, 1, s ~Union~ {t}],
%t A317165      {j, u}], 0] + Sum[b[u + j - 1, o - j, t + 1, s], {j, o}]];
%t A317165 a[n_] := b[n(n+1)/2, 0, 0, {}];
%t A317165 Table[a[n], {n, 0, 8}] (* _Jean-François Alcover_, Sep 01 2021, after _Alois P. Heinz_ *)
%Y A317165 Cf. A000217, A246292, A317130, A317166, A317273.
%K A317165 nonn
%O A317165 0,3
%A A317165 _Alois P. Heinz_, Jul 23 2018