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!)
A326308 Number of inversion sequences of length n where all consecutive subsequences i,j,k satisfy i > j < k or i < j > k. 2
1, 1, 2, 1, 3, 6, 26, 85, 476, 2171, 14905, 87153, 708825, 5053464, 47514180, 399542814, 4264132468, 41306091312, 493337571005, 5408829555639, 71476985762027, 874870165668858, 12673922434134249, 171294209823727623, 2699365743596908540, 39925463781029750810 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
Juan S. Auli and Sergi Elizalde, Consecutive patterns in inversion sequences II: avoiding patterns of relations, arXiv:1906.07365 [math.CO], 2019.
FORMULA
a(n) ~ n! * c * 2^n / (Pi^n * sqrt(n)), where c = 1.0215796642504649172542599982453320786973706265645819484... - Vaclav Kotesovec, Oct 31 2019
EXAMPLE
a(6) = 26: 010101, 010102, 010103, 010104, 010105, 010201, 010202, 010203, 010204, 010205, 010212, 010213, 010214, 010215, 010301, 010302, 010303, 010304, 010305, 010312, 010313, 010314, 010315, 010323, 010324, 010325.
MAPLE
b:= proc(n, j, t, u, c) option remember; `if`(n=0, 1, add(
`if`(c>0 or i>j and t or i<j and u, b(n-1, i,
is(i<j), is(i>j), max(0, c-1)), 0), i=1..n))
end:
a:= n-> b(n, 0, true$2, 2):
seq(a(n), n=0..25);
MATHEMATICA
b[n_, j_, t_, u_, c_] := b[n, j, t, u, c] = If[n == 0, 1, Sum[If[c>0 || i>j && t || i<j && u, b[n-1, i, i<j, i>j, Max[0, c-1]], 0], {i, 1, n}]];
a[n_] := b[n, 0, True, True, 2];
a /@ Range[0, 25] (* Jean-François Alcover, Feb 29 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A260666 A140644 A321651 * A073901 A116381 A176120
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Oct 17 2019
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 19 14:10 EDT 2024. Contains 371792 sequences. (Running on oeis4.)