OFFSET
1,1
COMMENTS
Subsequence of A085722.
For n>1, a(n) == 5 (mod 10).
The corresponding pairs of primes (p, q) = ((m-1)^2+1, (m+1)^2+1) are congruent to 7 (mod 10), and the semiprimes are of the form m^2+1 = 2r where r is congruent to 3 (mod 10). So, a(n) = (q - 2r - 1)/2 = (2r - p + 1)/2 = (q - p)/4.
EXAMPLE
15 is in the sequence because 15^2 + 1 = 2*113 is semiprime, and 14^2 + 1 = 197, 16^2 + 1 = 257 are prime numbers.
MATHEMATICA
Select[Range[50000], PrimeQ[(#-1)^2+1]&&PrimeOmega [#^2+1]==2&&PrimeQ[(#+1)^2+1]&]
PROG
(PARI) isok(m) = (bigomega(m^2+1) == 2) && isprime((m-1)^2+1) && isprime((m+1)^2+1); \\ Michel Marcus, Nov 23 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Nov 23 2018
STATUS
approved