OFFSET
1,1
COMMENTS
p and q can be the same. [Harvey P. Dale, Jan 15 2012]
The terms are semiprimes of the form 4k + 1, and comprise only a portion of all such semiprimes, see A108181. - Richard R. Forberg, Aug 27 2013
LINKS
François Huppé, Table of n, a(n) for n = 1..10000 (First 1000 terms from T. D. Noe).
EXAMPLE
65 = 5 * 13. Note that 5 mod 4 = 1 and 13 mod 4 = 1, so 65 is a term.
MATHEMATICA
With[{prs=Select[Prime[Range[150]], Mod[#, 4]==1&]}, Take[Union[Times @@@ Tuples[prs, 2]], 60]] (* Harvey P. Dale, Jan 15 2012 *)
PROG
(Python)
from math import isqrt
from sympy import primerange
from oeis_sequences.OEISsequences import bisection
def A121387(n):
def g(x): return sum(1 for p in primerange(5, x+1) if p&3==1)
def f(x): return int(n+x+((t:=g(s:=isqrt(x)))*(t-1)>>1)-sum(g(x//p) for p in primerange(5, s+1) if p&3==1))
return bisection(f, n, n) # Chai Wah Wu, Dec 20 2025
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Alford Arnold, Jul 26 2006, corrected Jun 24 2007
EXTENSIONS
Better definition from T. D. Noe, Sep 25 2007
STATUS
approved
