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.

A316730 Number of permutations of {0,1,...,2n+2} with first element n whose sequence of ascents and descents forms a Dyck path.

This page as a plain text file.
%I A316730 #17 Mar 27 2021 08:08:06
%S A316730 1,7,121,4411,283073,28318137,4076415425,798519164779,204292676593353,
%T A316730 66150225395814649,26444888796754193841,12792566645739144488693,
%U A316730 7364969554345555373419625,4976538708651698959601499559,3900052284443403730374391636689
%N A316730 Number of permutations of {0,1,...,2n+2} with first element n whose sequence of ascents and descents forms a Dyck path.
%C A316730 All terms are odd.
%H A316730 Alois P. Heinz, <a href="/A316730/b316730.txt">Table of n, a(n) for n = 0..224</a>
%H A316730 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>
%F A316730 a(n) = A316728(n+1,n).
%F A316730 a(n) ~ c * 4^n * (n!)^2, where c = 1.897642067924382577976619913635026612792069869805703855808680498665... - _Vaclav Kotesovec_, Jul 15 2018
%e A316730 a(0) = 1: 021.
%e A316730 a(1) = 7: 12043, 12430, 13042, 13240, 13420, 14032, 14230.
%e A316730 a(2) = 121: 2301654, 2304165, 2304651, 2305164, ..., 2635041, 2635140, 2645031, 2645130.
%p A316730 b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
%p A316730       `if`(t>0,   add(b(u-j, o+j-1, t-1), j=1..u), 0)+
%p A316730       `if`(o+u>t, add(b(u+j-1, o-j, t+1), j=1..o), 0))
%p A316730     end:
%p A316730 a:= n-> b(n, n+2, 0):
%p A316730 seq(a(n), n=0..20);
%t A316730 b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1,
%t A316730      If[t > 0,     Sum[b[u - j, o + j - 1, t - 1], {j, 1, u}], 0] +
%t A316730      If[o + u > t, Sum[b[u + j - 1, o - j, t + 1], {j, 1, o}], 0]];
%t A316730 a[n_] := b[n, n+2, 0];
%t A316730 a /@ Range[0, 20] (* _Jean-François Alcover_, Mar 27 2021, after _Alois P. Heinz_ *)
%Y A316730 Cf. A316728.
%K A316730 nonn
%O A316730 0,2
%A A316730 _Alois P. Heinz_, Jul 11 2018