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.

A371903 Total number of levels in all Dyck paths of semilength n containing exactly 2 path nodes.

This page as a plain text file.
%I A371903 #39 Apr 22 2025 16:18:31
%S A371903 0,1,3,5,15,44,134,427,1408,4753,16321,56812,200046,711425,2551886,
%T A371903 9222147,33544682,122712465,451169747,1666248405,6178586630,
%U A371903 22994275870,85859249486,321562877934,1207665205311,4547078084804
%N A371903 Total number of levels in all Dyck paths of semilength n containing exactly 2 path nodes.
%H A371903 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>
%e A371903 a(3) = 3 + 2 + 0 + 0 + 0 = 5:
%e A371903    1
%e A371903   _2   /\      _2           1           1
%e A371903   _2  /  \      3  /\/\     3  /\       3    /\     3
%e A371903   _2 /    \    _2 /    \    3 /  \/\    3 /\/  \    4 /\/\/\    .
%p A371903 g:= proc(x, y, p) (h-> `if`(x=0, add(`if`(coeff(h, z, i)=2, 1, 0),
%p A371903       i=0..degree(h)), b(x, y, h)))(p+`if`(coeff(p, z, y)<3, z^y, 0))
%p A371903     end:
%p A371903 b:= proc(x, y, p) option remember; `if`(y+2<=x,
%p A371903       g(x-1, y+1, p), 0)+`if`(y>0, g(x-1, y-1, p), 0)
%p A371903     end:
%p A371903 a:= n-> g(2*n, 0$2):
%p A371903 seq(a(n), n=0..18);
%Y A371903 Column k=2 of A371928.
%Y A371903 Cf. A000108, A051485, A152880.
%K A371903 nonn,more
%O A371903 0,3
%A A371903 _Alois P. Heinz_, Apr 13 2024