OFFSET
1,5
COMMENTS
Landau's function g(n) = A000793(n) gives the maximum order of any permutation on n elements.
EXAMPLE
There are two different cycle types of permutations in S_6 of the maximum order g(6) = 6, for example (123456) and (12)(345)(6). The minimum number of cycles is A383459(6) = 1 and maximum number is a(6) = 3.
PROG
(Julia)
using Combinatorics
arrs = []
for n in 1:25
ps = integer_partitions(n)
lcms = lcm.(ps)
the_max, imax, = findmax(lcms)
max_order_cyc_idxs = []
for (i, l) in enumerate(lcms)
if the_max == l
push!(max_order_cyc_idxs, i)
end
end
push!(arrs, ps[max_order_cyc_idxs])
end
map(x->maximum(length.(x)), arrs)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Anand Jain, Mar 22 2025
STATUS
approved
