OFFSET
1,1
COMMENTS
All terms are odd primes.
a(79) > 10000, if it exists.
a(80)..a(93) = {3, 7, 13, 7, 19, 31, 13, 163, 797, 3, 3, 11, 13, 5}, a(95)..a(112) = {5, 2657, 19, 787, 3, 17, 3, 7, 11, 1009, 3, 61, 53, 2371, 5, 3, 3, 11}, a(114)..a(126) = {103, 461, 7, 3, 13, 3, 7, 5, 31, 41, 23, 41, 587}, a(128)..a(132) = {7, 13, 37, 3, 23}, a(n) is currently unknown for n = {79, 94, 113, 127, 133, ...} (see the status file under Links).
LINKS
Aurelien Gibier, Table of n, a(n) for n = 1..78 (first 42 terms from Robert G. Wilson v)
Robert G. Wilson v, Table of n, a(n) for n = 1..1000 with status of unknown terms [updated/edited by Jon E. Schoenfield]
FORMULA
a(n) = 3 if and only if n^2 + n + 1 is a prime (A002384).
EXAMPLE
a(10) = 53 because (10^p + 11^p)/21 is composite for all p < 53 and prime for p = 53.
MATHEMATICA
lmt = 4200; f[n_] := Block[{p = 2}, While[p < lmt && !PrimeQ[((n + 1)^p + n^p)/(2n + 1)], p = NextPrime@ p]; If[p > lmt, 0, p]]; Do[Print[{n, f[n] // Timing}], {n, 1000}] (* Robert G. Wilson v, Dec 01 2014 *)
PROG
(PARI) a(n)=forprime(p=3, , if(ispseudoprime((n^p+(n+1)^p)/(2*n+1)), return(p)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric Chen, Nov 28 2014
EXTENSIONS
a(43) from Aurelien Gibier, Nov 27 2023
STATUS
approved