OFFSET
1,1
COMMENTS
Numbers n such that n^3 + 1 is a semiprime, because then n^3 + 1 must be odd, since n^3 + 1 = (n+1)*(n^2 - n + 1) is a semiprime only if n+1 is odd. - Jonathan Sondow, Feb 02 2014
Obviously, n + 1 is always a prime number. Sequence is intersection of A006093 and A055494. - Altug Alkan, Dec 20 2015
LINKS
R. J. Mathar, Table of n, a(n) for n = 1..2086
FORMULA
EXAMPLE
a(1)=2 because 2^3+1=9=3*3, a(13)=100: 100^3+1=1000001=101*9901.
MAPLE
select(n -> isprime(n+1) and isprime(n^2-n+1), [seq(2*i, i=1..1000)]); # Robert Israel, Dec 20 2015
MATHEMATICA
Select[Range[1200], PrimeQ[#^2 - # + 1] && PrimeQ[# + 1] &] (* Jonathan Sondow, Feb 02 2014 *)
PROG
(PARI) for(n=1, 1e5, if(bigomega(n^3+1)==2, print1(n, ", "))); \\ Altug Alkan, Dec 20 2015
(Magma) [n: n in [1..2*10^3] | IsPrime(n+1) and IsPrime(n^2-n+1)]; // Vincenzo Librandi, Dec 21 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Jun 20 2004
EXTENSIONS
Corrected by Zak Seidov, Mar 08 2006
STATUS
approved