OFFSET
1,1
COMMENTS
Subsequence of A005574.
For n>1, a(n) == 0 (mod 10).
The corresponding pairs of semiprimes ((m-1)^2+1, (m+1)^2+1) are of the form (2p, 2q) with p, q primes == 1 (mod 10). So, a(n) = (q - p)/2 and a(n)^2 + 1 = p + q - 1.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
10 is in the sequence because 10^2 + 1 = 101 is prime, and 9^2 + 1 = 2*41, 11^2 + 1 = 2*61 are semiprimes.
MATHEMATICA
Select[Range[50000], PrimeOmega[(#-1)^2+1]==2&&PrimeQ[#^2+1]&&PrimeOmega[(#+1)^2+1]==2&]
Mean/@SequencePosition[Table[Which[PrimeQ[m^2+1], 1, PrimeOmega[m^2+1]==2, 2, True, 0], {m, 30000}], {2, 1, 2}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 04 2019 *)
PROG
(PARI) isok(m) = isprime(m^2+1) && (bigomega((m-1)^2+1) == 2) && (bigomega((m+1)^2+1) == 2); \\ Michel Marcus, Nov 20 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Nov 19 2018
STATUS
approved