OFFSET
0,7
COMMENTS
A permutation p in [n] (where n >= 0) is reducible if there exist an i in 1..n-1 such that for all j in the range 1..i and all k in the range i+1..n it is true that p(j) < p(k). (Note that a range a..b includes a and b.) If such an i exists we say that i splits the permutation p at i and that i is a split point of p.
The list of permutations starts with the empty permutation (), which has no split points. The first permutation which has a split point is (1, 2).
EXAMPLE
Rows give the terms corresponding to the permutations of [n].
[0] [0]
[1] [0]
[2] [1, 0]
[3] [1, 1, 2, 0, 0, 0]
[4] [1, 1, 1, 1, 1, 1, 2, 2, 3, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0]
PROG
(SageMath)
def FirstSplit(p) -> int:
n = p.size()
for i in (1..n-1):
ok = True
for j in (1..i):
if not ok: break
for k in (i + 1..n):
if p(j) > p(k):
ok = False
break
if ok: return i
return 0
def A356324_row(n): return [FirstSplit(p) for p in Permutations(n)]
for n in range(6): print(A356324_row(n))
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Peter Luschny, Aug 03 2022
STATUS
approved