OFFSET
1,3
MATHEMATICA
MaxOrdPowTwo[n_] := MaximalBy[Select[Table[{k, MultiplicativeOrder[k, n]}, {k, n}], IntegerQ@Log2@#[[2]] &], Last][[1, 2]];
MaxOrdPowTwoConjectured[n_] := 2^IntegerExponent[CarmichaelLambda[n], 2]; (* conjectured *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Dmitry Grekov, Aug 09 2022
STATUS
approved