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 #6 Oct 12 2015 09:09:05
%S 1,3,15,58,231,891,3403,12870,48318,180356,670014,2479302,9143885,
%T 33627777,123366789,451612846,1650111453,6019100025,21922936343,
%U 79740801036,289690000380,1051250045960,3811012240380,13802994382860,49950211130905,180617997397887
%N Number of Dyck paths of semilength n having exactly two (possibly overlapping) DUDU's (with U=(1,1), D=(1,-1)).
%H Alois P. Heinz, <a href="/A263173/b263173.txt">Table of n, a(n) for n = 4..1000</a>
%e a(4) = 1: UDUDUDUD.
%e a(5) = 3: UDUDUDUUDD, UUDDUDUDUD, UUDUDUDUDD.
%e a(6) = 15: UDUDUDUUDDUD, UDUDUDUUDUDD, UDUDUDUUUDDD, UDUDUUDDUDUD, UDUDUUDUDUDD, UDUUDDUDUDUD, UDUUDUDUDUDD, UUDDUDUDUUDD, UUDUDDUDUDUD, UUDUDUDDUDUD, UUDUDUDUDDUD, UUDUDUDUUDDD, UUUDDDUDUDUD, UUUDDUDUDUDD, UUUDUDUDUDDD.
%p a:= proc(n) option remember; `if`(n<5, `if`(n=4, 1, 0),
%p ((2*n-7)*a(n-1) +(5*n-15)*a(n-2) +(2*n-5)*a(n-3)
%p -(n-2)*a(n-4))/(n-4))
%p end:
%p seq(a(n), n=4..30);
%Y Column k=2 of A102405.
%K nonn
%O 4,2
%A _Alois P. Heinz_, Oct 11 2015