login

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”).

A264077
Number of permutations of [n] with exactly two (possibly overlapping) occurrences of the consecutive step pattern up, down, up, down.
2
272, 4352, 42880, 530432, 7662336, 101713920, 1402932224, 21604831232, 343423787008, 5608501018624, 97560785780736, 1783363198386176, 33762252617416704, 668148809474244608, 13830009274919288832, 297227159309157138432, 6632506903059366936576
OFFSET
7,1
LINKS
MAPLE
b:= proc(u, o, t, c) option remember; `if`(c>2, 0, `if`(u+o=0,
`if`(c=2, 1, 0), add(b(u-j, o-1+j, [2, 2, 4, 2][t], c), j=1..u)+
add(b(u+j-1, o-j, [1, 3, 1, 3][t], c+`if`(t=4, 1, 0)), j=1..o)))
end:
a:= n-> b(0, n, 1, 0);
seq(a(n), n=7..25); # Alois P. Heinz, Nov 02 2015
CROSSREFS
Column k=2 of A230797.
Sequence in context: A205345 A302899 A266106 * A305683 A317063 A316930
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 02 2015
STATUS
approved