OFFSET
2,1
EXAMPLE
2^3 - 2^2 + 1 = 5, which is prime, so a(2) = 2.
2^5 - 2^3 + 1 = 25 = 5*5, and
3^5 - 3^3 + 1 = 217 = 7*31, but
5^5 - 5^3 + 1 = 3001, which is prime, so a(3) = 5.
MATHEMATICA
seq={}; Do[k=1; Until[PrimeQ[k^Prime[n]-k^((Prime[n]+1)/2)+1], k++]; AppendTo[seq, k], {n, 2, 71}]; seq (* James C. McMahon, May 06 2024 *)
PROG
(PARI) a(n) = {my(k=1, p=prime(n)); while (!isprime(k^p-k^((p+1)/2)+1), k++); k; } \\ Michel Marcus, Sep 16 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Oct 28 2005
EXTENSIONS
a(33) and a(34) concatenated by Georg Fischer, Jun 22 2022
STATUS
approved