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.

A304777 Number of partitions p of n such that the sequence of level steps (when interpreted as ascents) and descents of p forms a Dyck path.

This page as a plain text file.
%I A304777 #16 May 28 2018 06:05:10
%S A304777 1,1,1,1,1,2,1,2,2,2,2,4,3,4,3,6,5,7,5,9,10,12,10,15,13,18,19,27,20,
%T A304777 30,30,40,40,52,48,61,61,77,79,100,99,124,129,150,150,200,199,240,249,
%U A304777 294,303,363,369,441,484,550,569,686,716,817,885,1003,1065
%N A304777 Number of partitions p of n such that the sequence of level steps (when interpreted as ascents) and descents of p forms a Dyck path.
%H A304777 Alois P. Heinz, <a href="/A304777/b304777.txt">Table of n, a(n) for n = 0..1000</a>
%H A304777 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>
%e A304777 a(5) = 2: 221, 5.
%e A304777 a(11) = 4: 33221, 443, 551, (11).
%e A304777 a(12) = 3: 33321, 552, (12).
%e A304777 a(15) = 6: 44331, 44421, 55221, 663, 771, (15).
%p A304777 b:= proc(n, i, c) option remember; `if`(n=0, `if`(c=0, 1, 0),
%p A304777      `if`(min(i, c)<1, 0, add(b(n-i*j, i-1,
%p A304777      `if`(j=0, c, c+j-2)), j=0..n/i)))
%p A304777     end:
%p A304777 a:= n-> `if`(n=0, 1, b(n$2, 1)):
%p A304777 seq(a(n), n=0..100);
%t A304777 b[n_, i_, c_] := b[n, i, c] = If[n == 0, If[c == 0, 1, 0], If[Min[i, c] < 1, 0, Sum[b[n - i*j, i - 1, If[j == 0, c, c + j - 2]], {j, 0, n/i}]]];
%t A304777 a[n_] := If[n == 0, 1, b[n, n, 1]];
%t A304777 Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, May 28 2018, from Maple *)
%Y A304777 Cf. A303287, A304778.
%K A304777 nonn
%O A304777 0,6
%A A304777 _Alois P. Heinz_, May 18 2018