login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A264896 Number of permutations of [n] with exactly one occurrence of the consecutive pattern 45321. 2
1, 12, 126, 1344, 15110, 180736, 2308548, 31481472, 457520055, 7068885600, 115808906178, 2006533573632, 36674815572540, 705453732298240, 14248697953325160, 301564509817810944, 6674811622886359005, 154228999030804811520, 3713903962096887036390 (list; graph; refs; listen; history; text; internal format)
OFFSET
5,2
COMMENTS
Consecutive patterns 12354, 21345, 54312 give the same sequence.
LINKS
EXAMPLE
a(5) = 1: 45321.
a(6) = 12: 156432, 256431, 356421, 453216, 456321, 463215, 546321, 563214, 564213, 564312, 564321, 645321.
MAPLE
b:= proc(u, o, t) option remember; `if`(u+o=0, 1, add(
b(u+j-1, o-j, `if`(u+j-3<j, 0, j)), j=1..o)+convert(series(
`if`(t=-2, x, 1)*add(b(u-j, o+j-1, `if`(j<t or t=-2, 0,
`if`(t>0, -1, `if`(t=-1, -2, 0)))), j=1..u), x, 2), polynom))
end:
a:= n-> coeff(b(n, 0$2), x, 1):
seq(a(n), n=5..25);
MATHEMATICA
b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, Sum[b[u + j - 1, o - j, If[u + j - 3 < j, 0, j]], {j, 1, o}] + Expand[If[t == -2, x, 1]*Sum[b[u - j, o + j - 1, If[j < t || t == -2, 0, If[t > 0, -1, If[t == -1, -2, 0]]]], {j, 1, u}]]];
a[n_] := Coefficient[b[n, 0, 0], x, 1];
Table[a[n], {n, 5, 25}] (* Jean-François Alcover, Nov 01 2021, after Alois P. Heinz *)
CROSSREFS
Column k=1 of A264781.
Sequence in context: A004991 A228008 A101602 * A062199 A199528 A124797
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 27 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)