OFFSET
3,1
COMMENTS
Equivalently, a(n) is the minimum order of a permutation of n points whose cycle lengths are at least 3.
a(n) <= 12. - David A. Corneth, Jan 09 2022
The sequence is periodic with period 4620 = 3*4*5*7*11. If n is divisible by 3, 4, 5, 7 or 11 then a(n) is the smallest such divisor. Otherwise, a(n) = 12 since every number >= 6 has a partition into parts of size 3 and 4. - Andrew Howroyd, Jan 12 2022
FORMULA
a(3*k) = 3, a(12*k + 4) = a(12*k + 8) = 4, k >= 1. - David A. Corneth, Jan 09 2022
EXAMPLE
a(13) = lcm(3,3,3,4) = 12.
a(14) = lcm(7,7) = 7.
PROG
(PARI) a(n)={my(m=oo); if(n>=3, forpart(p=n, m=min(m, lcm(Vec(p))), [3, n])); m} \\ Andrew Howroyd, Jan 09 2022
(PARI) a(n)={if(n<3, oo, for(k=3, 11, if(n%k==0, return(k))); 12)} \\ Andrew Howroyd, Jan 09 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Janaka Rodrigo, Jan 09 2022
EXTENSIONS
Terms corrected by Andrew Howroyd, Jan 09 2022
STATUS
approved