OFFSET
1,2
LINKS
Jean-Marc Rebert, Table of n, a(n) for n = 1..1000
EXAMPLE
prime(1) = 2 and 1*2^2 + 1 = 5 is prime, and no lesser odd k satisfies this, so a(1) = 1.
MATHEMATICA
a[n_] := Module[{m = 2^Prime[n], k = 1}, While[!PrimeQ[k*m + 1], k += 2]; k]; Array[a, 65] (* Amiram Eldar, Mar 15 2023 *)
PROG
(PARI) a(n)=my(m=2^prime(n), k=1); while(!isprime(k*m+1), k+=2); k
CROSSREFS
KEYWORD
nonn
AUTHOR
Jean-Marc Rebert, Mar 15 2023
STATUS
approved