OFFSET
2,1
COMMENTS
The corresponding values of k are in A216506.
LINKS
Amiram Eldar, Table of n, a(n) for n = 2..670
EXAMPLE
a(7) = 29 because 7^14 - 1 = 2 ^ 4 * 3 * 29 * 113 * 911 * 4733 and the smallest prime divisor of the form k*n+1 is 29 = 4*7+1.
MATHEMATICA
Table[p=First/@FactorInteger[n^(2*n)-1]; Select[p, Mod[#1, n] == 1 &, 1][[1]], {n, 2, 41}]
a[n_] := Module[{m = n + 1}, While[!PrimeQ[m] || PowerMod[n, 2*n, m] != 1, m += n]; m]; Array[a, 100, 2] (* Amiram Eldar, May 17 2024 *)
PROG
(PARI) a(n) = {my(m = n + 1); while(!isprime(m) || Mod(n, m)^(2*n) != 1, m += n); m; } \\ Amiram Eldar, May 17 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Sep 11 2012
EXTENSIONS
Data corrected by Amiram Eldar, May 17 2024
STATUS
approved