OFFSET
1,1
EXAMPLE
For n=3, 2^3=8, and k=9 works, since 2^9 = 512 == 8 (mod 9).
MATHEMATICA
f[n_] := Block[{k = 2^n + 1}, While[ PowerMod[2, k, k] != PowerMod[2, n, k], k++]; k]; Array[f, 30] (* Robert G. Wilson v, Aug 01 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Constraint on k added to the definition by R. J. Mathar, Aug 01 2011
STATUS
approved