OFFSET
1,1
COMMENTS
Obviously, k+1 and k-1 are always prime numbers.
If k is a term then m = (k - 1) * (k^2 + k + 1) is a term of A169635, i.e., A001157(m) = A001157(m+2) (De Koninck, 2002). - Amiram Eldar, Apr 19 2024
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Jean-Marie De Koninck, On the solutions of sigma_2(n) = sigma_2(n + l), Ann. Univ. Sci. Budapest Sect. Comput. 21 (2002), 127-133.
EXAMPLE
a(1) = 6 because 6^3-1 = 215 = 5*43 and 6^3+1 = 217 = 7*31, therefore 215, 217 are both semiprimes.
MATHEMATICA
Select[Range[500000], PrimeOmega[#^3 - 1] == PrimeOmega[#^3 + 1] == 2 &]
Select[Range[10^6], And @@ PrimeQ[{# - 1, # + 1, #^2 - # + 1, #^2 + # + 1}] &] (* Amiram Eldar, Apr 19 2024 *)
PROG
(Magma) IsSemiprime:=func< n | &+[k[2]: k in Factorization(n)] eq 2 >; [ n: n in [2..300000] | IsSemiprime(n^3+1) and IsSemiprime(n^3-1) ];
(PARI) isok(n) = (bigomega(n^3-1) == 2) && (bigomega(n^3+1) == 2); \\ Michel Marcus, Jan 26 2016
(PARI) is(n) = isprime(n - 1) && isprime(n + 1) && isprime(n^2 - n + 1) && isprime(n^2 + n + 1); \\ Amiram Eldar, Apr 19 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jan 25 2016
STATUS
approved