OFFSET
1,7
COMMENTS
LINKS
R. J. Mathar, Table of n, a(n) for n = 1..1000
FORMULA
MAPLE
A279186 := proc(n)
local a, k ;
a := 1 ;
for k from 0 to n-1 do
a := max(a, A279185(k, n)) ;
end do:
a ;
end proc : # R. J. Mathar, Dec 15 2016
MATHEMATICA
T[n_, k_] := Module[{g, y, r}, If[k == 0, Return[1]]; y = n; g = GCD[k, y]; While[g > 1, y = y/g; g = GCD[k, y]]; If[y == 1, Return[1]]; r = MultiplicativeOrder[k, y]; r = r/2^IntegerExponent[r, 2]; If[r == 1, Return[1]]; MultiplicativeOrder[2, r]];
a[n_] := Table[T[n, k], {k, 0, n - 1}] // Max;
Array[a, 90] (* Jean-François Alcover, Nov 27 2017, after Robert Israel *)
PROG
(PARI) { A279186(n) = my(r=lcm(znstar(n)[2])); znorder(Mod(2, r>>valuation(r, 2))); } \\ Max Alekseyev, Feb 02 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 14 2016
STATUS
approved