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

A177471
Avoiding the pattern 121'2'. To avoid 121'2' means not to have four consecutive letters such that the first letter is less than the second one and the third letter is less than the fourth one.
9
1, 1, 2, 6, 18, 61, 281, 1541, 8920, 57924, 437490, 3611389, 31721537, 304085783, 3180772870, 35422074330, 418050879810, 5266547286061, 70459362412265, 991921937012273, 14681437097585260, 228615478225446360, 3730868960721027906, 63577641238069645741
OFFSET
0,3
LINKS
S. Kitaev, Introduction to partially ordered patterns, Discrete Applied Mathematics 155 (2007), 929-944.
FORMULA
a(n) ~ c * d^n * n!, where d = 0.7411900298994603810165..., c = 2.41202786457703060749584... . - Vaclav Kotesovec, Aug 22 2014
MAPLE
b:= proc(u, o, s, t) option remember; `if`(u+o=0, 1,
add(b(u-j, o+j-1, t, false), j=1..u)+
`if`(s, 0, add(b(u+j-1, o-j, t, true), j=1..o)))
end:
a:= n-> b(n, 0, false$2):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 25 2013
MATHEMATICA
b[u_, o_, s_, t_] := b[u, o, s, t] = If[u+o == 0, 1, Sum[b[u-j, o+j-1, t, False], {j, 1, u}] + If[s, 0, Sum[b[u+j-1, o-j, t, True], {j, 1, o}]]];
a[n_] := b[n, 0, False, False];
a /@ Range[0, 25] (* Jean-François Alcover, Nov 03 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A228448 A346490 A177473 * A303117 A150052 A262590
KEYWORD
nonn
AUTHOR
Signy Olafsdottir (signy06(AT)ru.is), May 09 2010
EXTENSIONS
a(10)-a(23) from Alois P. Heinz, Oct 25 2013
STATUS
approved