OFFSET
1,3
COMMENTS
Conjecture: a(n) > 0 for all n > 2.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..2000
EXAMPLE
a(3) = 2 since 2 is a prime smaller than prime(3) = 5 with 2^2 - 1 = 3 a primitive root modulo prime(3) = 5.
MATHEMATICA
gp[g_, p_]:=Mod[g, p]>0&&(Length[Union[Table[Mod[g^k, p], {k, 1, p-1}]]]==p-1)
Do[Do[If[gp[2^(Prime[k])-1, Prime[n]], Print[n, " ", Prime[k]]; Goto[aa]], {k, 1, n-1}]; Print[n, " ", 0]; Label[aa]; Continue, {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Apr 20 2014
STATUS
approved