OFFSET
0,2
EXAMPLE
a(3) = 25 because 2^25 = 33554432 = 7 + 25*1342177.
MATHEMATICA
nk[n_] := Module[ {k}, k = 1;
While[PowerMod[2, k, k] != 2 n + 1, k++]; k]
Join[{0}, Table[nk[i], {i, 1, 33}]] (* Robert Price, Oct 11 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Nov 14 2006
EXTENSIONS
Edited by Max Alekseyev, May 20 2011
STATUS
approved