OFFSET
1,1
COMMENTS
Odd terms are 155, 215, 221, 255, 341, 465, 527, 623, 635, 645, 663, ...
These odd terms are odd numbers k such that (k mod A002322(k)) > (k mod A002326((k-1)/2)). - Amiram Eldar and Thomas Ordowski, Nov 28 2019
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
A270096:= proc(n) local d, b, t, m, c;
d:= padic:-ordp(n, 2);
b:= n/2^d;
t:= 2 &^ n mod n;
m:= numtheory:-mlog(t, 2, b, c);
if m < d then m:= m + c*ceil((d-m)/c) fi;
m
end proc:
A270096(1):= 0:
A276976:= proc(n) local lambda;
lambda:= numtheory:-lambda(n);
if n mod lambda = 0 then lambda
elif n mod 8 = 0 and (n-2) mod lambda = 0 then lambda+2
else n mod lambda
fi
end proc:
A276976(1):= 0:
A276976(8):= 4:
A276976(24):= 4:
MATHEMATICA
With[{nn = 750}, Select[Range@ nn, Function[n, SelectFirst[Range[nn/4 + 10], Function[m, AllTrue[Range[2, n - 1], PowerMod[#, m , n] == PowerMod[#, n , n] &]]] > SelectFirst[Range[nn/4 + 10], PowerMod[2, n, n] == PowerMod[2, #, n] &]]]] (* Michael De Vlieger, Aug 15 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Aug 15 2017, following a suggestion from N. J. A. Sloane
STATUS
approved