OFFSET
1,1
COMMENTS
Subsequence of A069062. - Michel Marcus, Jan 22 2016
Subsequence of A014574. - Robert Israel, Jan 24 2016
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1)=12 because 12^2-1=143=11*13 and 12^2+1=145=5*29 are both semiprimes.
MAPLE
filter:= n -> isprime(n+1) and isprime(n-1) and numtheory:-bigomega(n^2+1)=2:
select(filter, [seq(i, i=2..1000, 2)]); # Robert Israel, Jan 24 2016
MATHEMATICA
Select[Range[7000], PrimeOmega[#^2 - 1] == PrimeOmega[#^2 + 1]== 2 &] (* Vincenzo Librandi, Jan 22 2016 *)
PROG
(Magma) IsSemiprime:=func< n | &+[k[2]: k in Factorization(n)] eq 2 >; [ n: n in [4..7000] | IsSemiprime(n^2+1) and IsSemiprime(n^2-1) ]; // Vincenzo Librandi, Jan 22 2016
(PARI) isok(n) = (bigomega(n^2-1) == 2) && (bigomega(n^2+1) == 2); \\ Michel Marcus, Jan 22 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, May 30 2005
STATUS
approved