OFFSET
1,2
COMMENTS
For all m, 2^A015921(m) - 1 belongs to this sequence.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..29055 (first 6822 terms from Zak Seidov)
OEIS Wiki, 2^n mod n.
MATHEMATICA
a015922Q[n_Integer] := If[Mod[2^n, n] == Mod[8, n], True, False];
a015922[n_Integer] :=
Flatten[Position[Thread[a015922Q[Range[n]]], True]];
a015922[1000000] (* Michael De Vlieger, Jul 16 2014 *)
m = 8; Join[Select[Range[m], Divisible[2^# - m, #] &], Select[Range[m + 1, 10^3], PowerMod[2, #, #] == m &]] (* Robert Price, Oct 12 2018 *)
Join[{1, 2, 3, 4, 8}, Select[Range[650], PowerMod[2, #, #]==8&]] (* Harvey P. Dale, Aug 22 2020 *)
PROG
(PARI) isok(n) = Mod(2, n)^n == Mod(8, n); \\ Michel Marcus, Oct 13 2013, Jul 16 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
First 5 terms inserted by David W. Wilson
STATUS
approved