OFFSET
1,1
COMMENTS
Numbers k such that k^4 + k^2 + 1 is a semiprime (A001358). - Thomas Ordowski, Sep 24 2015
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
EXAMPLE
6 is a term since both 6*7 + 1 = 43 and 6*5 + 1 = 31 are primes.
MATHEMATICA
Select[Range[3000], PrimeQ[# (# - 1) + 1] && PrimeQ[# (# + 1) + 1] &] (* T. D. Noe, Apr 06 2012 *)
Select[Range[2, 3000], Plus@@Last/@FactorInteger[(#^6 - 1) / (#^2 - 1)] == 2 &] (* Vincenzo Librandi, Sep 24 2015 *)
Select[Range[2600], PrimeOmega[#^4+#^2+1]==2&] (* Harvey P. Dale, Jun 04 2019 *)
PROG
(Magma) [n: n in [0..3000] | IsPrime(n^2+n+1) and IsPrime(n^2-n+1)]; // Vincenzo Librandi, Sep 24 2015
(PARI) for(n=1, 1e3, if (isprime(n*(n+1)+1) && if (isprime(n*(n-1)+1), print1(n", ")))) \\ Altug Alkan, Sep 24 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Apr 02 2003
EXTENSIONS
More terms from Don Reble, Apr 08 2003
STATUS
approved