OFFSET
0,3
COMMENTS
A length n inversion sequence e_1e_2...e_n is a sequence of integers where 0 <= e_i <= i-1. The term a(n) counts those length n inversion sequences with no entries e_i, e_j, e_k (where i<j<k) such that e_i >= e_j = e_k. This is the same as the set of length n inversion sequences avoiding 000 and 100.
LINKS
Benjamin Testart, Table of n, a(n) for n = 0..540
Megan A. Martinez and Carla D. Savage, Patterns in Inversion Sequences II: Inversion Sequences Avoiding Triples of Relations, arXiv:1609.08106 [math.CO], 2016.
Benjamin Testart, Completing the enumeration of inversion sequences avoiding one or two patterns of length 3, arXiv:2407.07701 [math.CO], 2024.
Chunyan Yan and Zhicong Lin, Inversion sequences avoiding pairs of patterns, arXiv:1912.03674 [math.CO], 2019.
FORMULA
The length 4 inversion sequences avoiding (000,100) are 0011, 0012, 0013, 0021, 0022, 0023, 0101, 0102, 0103, 0110, 0112, 0113, 0120, 0121, 0122, 0123.
MAPLE
b:= proc(n, i, m, s) option remember; `if`(n=0, 1, add(
`if`(j in s, 0, b(n-1, i+1, max(m, j),
`if`(j<=m, s union {j}, s))), j=1..i))
end:
a:= n-> b(n, 1, 0, {}):
seq(a(n), n=0..15); # Alois P. Heinz, Feb 22 2017
MATHEMATICA
b[n_, i_, m_, s_List] := b[n, i, m, s] = If[n == 0, 1, Sum[If[MemberQ[s, j], 0, b[n-1, i+1, Max[m, j], If[j <= m, s ~Union~ {j}, s]]], {j, 1, i}] ]; a[n_] := b[n, 1, 0, {}]; Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Jul 10 2017, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Megan A. Martinez, Feb 09 2017
EXTENSIONS
a(10)-a(23) from Alois P. Heinz, Feb 22 2017
a(24)-a(27) from Vaclav Kotesovec, Oct 08 2021
STATUS
approved