OFFSET
2,4
MATHEMATICA
lk[n_]:=Module[{k=1}, While[!PrimeQ[n^k+n-1], k++]; k]; Array[lk, 100, 2] (* Harvey P. Dale, Jun 29 2017 *)
PROG
(PARI) a(n) = {my(k=1); while(!isprime(n^k+n-1), k++); k; } \\ Michel Marcus, Nov 29 2013
(Haskell)
a076845 n = head [k | k <- [1..], a010051'' (n ^ k + n - 1) == 1]
-- Reinhard Zumkeller, Jul 17 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Nov 20 2002
STATUS
approved