Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 Mar 26 2024 16:14:37
%S 1,1,3,20,140,1134,9702,87516,817245,7852130,77135630,771742608,
%T 7839348244,80661853300,839138980500,8813312133840,93339369441540,
%U 995827949882370,10694044148599350,115515073043785800,1254354063204682440,13685749828961247180
%N Number of Dyck paths of semilength 2n having exactly n (possibly overlapping) occurrences of the consecutive step pattern UDU, where U = (1,1) and D = (1,-1).
%H Alois P. Heinz, <a href="/A371411/b371411.txt">Table of n, a(n) for n = 0..932</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>
%F a(n) = A091869(2n,n).
%F a(n) mod 2 = 1 <=> n in { round(2^(2*k-3)) : k >= 0 } = { A081294 } U { 0 }.
%e a(1) = 1: UDUD.
%e a(2) = 3: UDUDUUDD, UDUUDUDD, UUDUDUDD.
%e a(3) = 20: UDUDUDUUDDUD, UDUDUDUUUDDD, UDUDUUDDUDUD, UDUDUUDUDDUD, UDUDUUDUUDDD, UDUDUUUDUDDD, UDUUDDUDUDUD, UDUUDUDDUDUD, UDUUDUDUDDUD, UDUUDUDUUDDD, UDUUDUUDUDDD, UDUUUDUDUDDD, UUDDUDUDUDUD, UUDUDDUDUDUD, UUDUDUDDUDUD, UUDUDUDUDDUD, UUDUDUDUUDDD, UUDUDUUDUDDD, UUDUUDUDUDDD, UUUDUDUDUDDD.
%e a(4) = 140: UDUDUDUDUUDDUUDD, UDUDUDUDUUUDDDUD, UDUDUDUDUUUDDUDD, ..., UUUDUDUUDUDUDDDD, UUUDUUDUDUDUDDDD, UUUUDUDUDUDUDDDD.
%p a:= proc(n) option remember; `if`(n<2, 1, (2*(n-1)*(2*n-1)^2*
%p a(n-1)+12*(n-2)*(2*n-1)*(2*n-3)*a(n-2))/((n+1)*n*(n-1)))
%p end:
%p seq(a(n), n=0..21);
%Y Cf. A000108, A081294, A091869.
%K nonn
%O 0,3
%A _Alois P. Heinz_, Mar 22 2024