OFFSET
1,1
EXAMPLE
7^3 +- 6 -> (337, 349) (both primes),
139^3 +- 138 -> (2685481, 2685757) (both primes).
MAPLE
a:=proc (n) if isprime(n)=true and isprime(n^3+n-1)=true and isprime(n^3-n+1) =true then n else end if end proc: seq(a(n), n=1..30000); # Emeric Deutsch, Apr 29 2008
MATHEMATICA
Select[Prime[Range[900]], PrimeQ[ #^3-(#-1)]&&PrimeQ[ #^3+(#-1)]&]
PROG
(Magma) [ n: n in [0..40000] | IsPrime(n) and IsPrime(n^3-(n-1)) and IsPrime(n^3 +(n-1)) ]; // Vincenzo Librandi, Nov 24 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Apr 21 2008
EXTENSIONS
More terms from Emeric Deutsch, Apr 29 2008
STATUS
approved