OFFSET
0,6
COMMENTS
LINKS
Peter Luschny, Permutations with Lehmer, a SageMath Jupyter Notebook.
EXAMPLE
[0] 1;
[1] 1;
[2] 0, 1;
[3] 0, 2, 1;
[4] 0, [2, 1], 9, 1;
[5] 0, [2, 3], [24, 17], 24, 1;
[6] 0, [2, 3, 3], [98, 29, 23], [156, 91], 55, 1;
[7] 0, [2, 8, 4], [181, 43, 157, 113], [1085, 243, 418], [714, 360], 118, 1;
Summing the bracketed terms reduces the triangle to A356263 .
.
The Lehmer mapping of the irreducible permutations to the partitions, case n = 4, k = 1: 2341 and 4123 map to the partition [3, 1], and 3412 map to the partition [2, 2]. Thus A356263(4, 1) = 2 + 1 = 3. Compare with the example in A355777.
.
The partition mapping of row 4:
[4] => 0
[3, 1] => 2
[2, 2] => 1
[2, 1, 1] => 9
[1, 1, 1, 1] => 1
PROG
(SageMath)
import collections
def reducible(p) -> bool:
return any(i for i in range(1, p.size())
if all(p(j) < p(k)
for j in range(1, i + 1)
for k in range(i + 1, p.size() + 1)
) )
def perm_irreducible_stats(n: int):
res = collections.defaultdict(int)
for p in Permutations(n):
if reducible(p): continue
l = p.to_lehmer_code()
c = [l.count(i) for i in range(len(p)) if i in l]
res[Partition(reversed(sorted(c)))] += 1
return sorted(res.items(), key=lambda x: len(x[0]))
@cached_function
def A356262_row(n):
if n <= 1: return [1]
return [0] + [v[1] for v in perm_irreducible_stats(n)]
for n in range(0, 8): print(A356262_row(n))
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Peter Luschny, Aug 01 2022
STATUS
approved