OFFSET
1,2
COMMENTS
FORMULA
q == 1 (mod k).
MATHEMATICA
b[n_] := Module[{k = 0}, While[PowerMod[2, n, n] != PowerMod[2, k, n], k++]; k]; aQ[n_] := PrimeQ[2^n - 2^b[n] + 1]; Select[Range[5000], aQ] (* Amiram Eldar, Apr 19 2019 *)
PROG
(PARI) f(n) = {my(m = 0); while (Mod(2, n)^m != 2^n, m++); m; } \\ A270096
isok(n) = my(m = f(n)); isprime(2^n - 2^m + 1); \\ Michel Marcus, Apr 23 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski, Apr 19 2019
EXTENSIONS
More terms from Amiram Eldar, Apr 19 2019
STATUS
approved