OFFSET
1,3
LINKS
Eric Chen, Table of n, a(n) for n = 1..1000
EXAMPLE
a(18) = 11 because the largest possible order mod 18 is 6, and because 16, 15, 14, and 12 are not coprime to 18, and the orders of 17 and 13 to mod 18 are 2 and 3, not the largest possible order, and the order of 11 to mod 18 is 6, so a(18) = 11.
MATHEMATICA
prms={}; f[n_] = Block[If[MultiplicativeOrder[p, n]=CarmichaelLambda[n], Join[prms, p]]; prms[-1]]; Array[f, 128]
PROG
(PARI) carmichaellambda(n)=lcm(znstar(n)[2]);
for(i=1, 128, p=0; for(q=1, i-1, if(gcd(q, i)==1&&znorder(Mod(q, i))==carmichaellambda(i), p=q)); print1(p", "))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric Chen, Nov 29 2014
EXTENSIONS
a(68) corrected by Eric Chen, Jun 01 2015
STATUS
approved