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.

A300322 Number T(n,k) of Dyck paths of semilength n such that 2*k is the difference between the area under the right half of the path and the area under the left half of the path; triangle T(n,k), n>=0, -floor(n*(n-1)/6) <= k <= floor(n*(n-1)/6), read by rows.

This page as a plain text file.
%I A300322 #24 May 31 2018 10:09:06
%S A300322 1,1,2,1,3,1,1,3,6,3,1,2,5,8,12,8,5,2,1,4,9,16,22,28,22,16,9,4,1,1,4,
%T A300322 11,21,34,49,60,69,60,49,34,21,11,4,1,2,7,15,31,53,82,114,147,171,186,
%U A300322 171,147,114,82,53,31,15,7,2,1,5,13,30,56,95,150,216,293,371,445,495,522,495,445,371,293,216,150,95,56,30,13,5,1
%N A300322 Number T(n,k) of Dyck paths of semilength n such that 2*k is the difference between the area under the right half of the path and the area under the left half of the path; triangle T(n,k), n>=0, -floor(n*(n-1)/6) <= k <= floor(n*(n-1)/6), read by rows.
%H A300322 Alois P. Heinz, <a href="/A300322/b300322.txt">Rows n = 0..60, flattened</a>
%H A300322 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>
%F A300322 T(n,k) = T(n,-k).
%F A300322 T(n,A130518(n)) = A177702(n).
%e A300322                /\
%e A300322 T(3,-1) = 1:  /  \/\
%e A300322 .
%e A300322                 /\
%e A300322                /  \     /\/\
%e A300322 T(3,0) = 3:   /    \   /    \   /\/\/\
%e A300322 .
%e A300322                  /\
%e A300322 T(3,1) = 1:   /\/  \
%e A300322 .
%e A300322 Triangle T(n,k) begins:
%e A300322 :                             1                            ;
%e A300322 :                             1                            ;
%e A300322 :                             2                            ;
%e A300322 :                         1,  3,  1                        ;
%e A300322 :                     1,  3,  6,  3,  1                    ;
%e A300322 :                 2,  5,  8, 12,  8,  5,  2                ;
%e A300322 :         1,  4,  9, 16, 22, 28, 22, 16,  9,  4,  1        ;
%e A300322 :  1, 4, 11, 21, 34, 49, 60, 69, 60, 49, 34, 21, 11, 4, 1  ;
%p A300322 b:= proc(x, y, v) option remember; expand(
%p A300322      `if`(min(y, v, x-max(y, v))<0, 0, `if`(x=0, 1, (l-> add(add(
%p A300322       b(x-1, y+i, v+j)*z^((y-v)/2+(i-j)/4), i=l), j=l))([-1, 1]))))
%p A300322     end:
%p A300322 T:= n-> (p-> seq(coeff(p, z, i), i=ldegree(p)..degree(p)))(
%p A300322              add(b(n, (n-2*j)$2), j=0..n/2)):
%p A300322 seq(T(n), n=0..12);
%t A300322 b[x_, y_, v_] := b[x, y, v] = Expand[If[Min[y, v, x - Max[y, v]] < 0, 0, If[x == 0, 1, Function[l, Sum[Sum[b[x - 1, y + i, v + j] z^((y - v)/2 + (i - j)/4), {i, l}], {j, l}]][{-1, 1}]]]];
%t A300322 T[n_] := Function[p, Table[Coefficient[p, z, i], {i, Range[Exponent[p, z, Reverse @@ # &], Exponent[p, z]]}]][Sum[b[n, n-2j, n-2j], {j, 0, n/2}]];
%t A300322 Table[T[n], {n, 0, 12}] // Flatten (* _Jean-François Alcover_, May 31 2018, from Maple *)
%Y A300322 Row sums give A000108.
%Y A300322 Column k=0 gives A300323.
%Y A300322 Cf. A130518, A129182, A177702, A239927, A298645, A300953.
%K A300322 nonn,tabf
%O A300322 0,3
%A A300322 _Alois P. Heinz_, Mar 02 2018