OFFSET
1,3
COMMENTS
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..756
MATHEMATICA
Table[If[MemberQ[{27, 64}, n], 0, k=1; While[ !PrimeQ[k^n+n], k++ ]; k], {n, 100}]
(* Second program: *)
okQ[n_] := n == 4 || IrreduciblePolynomialQ[x^n + n];
a[n_] := If[!okQ[n], 0, s = 1; While[!PrimeQ[s^n + n], s++]; s];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jan 15 2019, from PARI *)
PROG
(PARI) isok(n) = (n==4) || polisirreducible(x^n+n);
a(n) = if (!isok(n), 0, my(s=1); while(!isprime(s^n+n), s++); s); \\ adapted by Michel Marcus, Jan 15 2019
(PARI) apply( {A072883(n)=if(is_A097792(n), n==4, for(k=1, oo, ispseudoprime(k^n+n) && return(k)))}, [1..99]) \\ M. F. Hasler, Jul 07 2024
(Python)
from sympy import isprime
def A072883(n):
if is_A097792(n): return int(n==4)
for k in range(1, 99**9):
if isprime(k**n+n): return k # M. F. Hasler, Jul 07 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Aug 13 2002
EXTENSIONS
More terms from T. D. Noe, Aug 24 2004
STATUS
approved