The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A231228 Number of permutations of [n] with exactly one occurrence of one of the consecutive patterns 123, 1432, 2431, 3421. 2
0, 0, 0, 1, 9, 59, 358, 2235, 14658, 103270, 778451, 6315499, 54733657, 507655301, 5003179539, 52430810493, 580611272956, 6796733911852, 83658527086447, 1083027034959367, 14678725047527255, 208344799726820123, 3084495765476262875, 47646333262275943521 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
FORMULA
a(n) ~ c * (2/Pi)^n * n! * n, where c = 3.08472832460941829086964816782... . - Vaclav Kotesovec, Aug 28 2014
EXAMPLE
a(3) = 1: 123.
a(4) = 9: 1243, 1342, 1432, 2134, 2341, 2431, 3124, 3421, 4123.
a(5) = 59: 12435, 12534, 13245, ..., 53124, 53421, 54123.
a(6) = 358: 124365, 125364, 125463, ..., 653124, 653421, 654123.
MAPLE
b:= proc(u, o, t) option remember;
`if`(t=7, 0, `if`(u+o=0, `if`(t in [4, 5, 6], 1, 0),
add(b(u+j-1, o-j, [2, 5, 2, 5, 7, 5][t]), j=1..o)+
add(b(u-j, o+j-1, [1, 3, 4, 4, 6, 7][t]), j=1..u)))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25);
MATHEMATICA
b[u_, o_, t_] := b[u, o, t] = If[t==7, 0, If[u+o==0, If[4 <= t <= 6, 1, 0],
Sum[b[u + j - 1, o - j, {2, 5, 2, 5, 7, 5}[[t]]], {j, 1, o}] +
Sum[b[u - j, o + j - 1, {1, 3, 4, 4, 6, 7}[[t]]], {j, 1, u}]]];
a[n_] := b[n, 0, 1];
a /@ Range[0, 25] (* Jean-François Alcover, Jan 03 2021, after Alois P. Heinz *)
CROSSREFS
Column k=1 of A231210.
Sequence in context: A174654 A027249 A026717 * A198847 A059356 A039929
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 05 2013
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 May 14 11:19 EDT 2024. Contains 372532 sequences. (Running on oeis4.)