OFFSET
1,1
COMMENTS
The squarefree semiprimes in A332821. - Peter Munn, Dec 25 2020
FORMULA
EXAMPLE
The sequence of terms together with their prime indices begins:
21: {2,4} 267: {2,24} 543: {2,42}
39: {2,6} 301: {4,14} 551: {8,10}
57: {2,8} 303: {2,26} 553: {4,22}
87: {2,10} 321: {2,28} 559: {6,14}
91: {4,6} 339: {2,30} 579: {2,44}
111: {2,12} 371: {4,16} 597: {2,46}
129: {2,14} 377: {6,10} 623: {4,24}
133: {4,8} 393: {2,32} 669: {2,48}
159: {2,16} 417: {2,34} 687: {2,50}
183: {2,18} 427: {4,18} 689: {6,16}
203: {4,10} 453: {2,36} 703: {8,12}
213: {2,20} 481: {6,12} 707: {4,26}
237: {2,22} 489: {2,38} 717: {2,52}
247: {6,8} 497: {4,20} 749: {4,28}
259: {4,12} 519: {2,40} 753: {2,54}
MATHEMATICA
Select[Range[100], SquareFreeQ[#]&&PrimeOmega[#]==2&&OddQ[Times@@(1+ PrimePi/@First/@FactorInteger[#])]&]
PROG
(Python)
from math import isqrt
from sympy import primepi, primerange
def A339004(n):
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
kmin = kmax >> 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+x-sum(primepi(x//p)-a>>1 for a, p in enumerate(primerange(isqrt(x)+1), 1) if a&1^1)
return bisection(f, n, n) # Chai Wah Wu, Apr 03 2025
CROSSREFS
A338911 is the not necessarily squarefree version.
A005117 lists squarefree numbers.
A300912 lists products of pairs of primes with relatively prime indices.
A318990 lists products of pairs of primes with divisible indices.
A320656 counts factorizations into squarefree semiprimes.
A338898, A338912, and A338913 give the prime indices of semiprimes, with product A087794, sum A176504, and difference A176506.
A338899, A270650, and A270652 give the prime indices of squarefree semiprimes, with difference A338900.
A338904 groups semiprimes by weight.
Cf. A000040, A001221, A001222, A056239, A112798, A166237, A195017, A320911, A338901, A338903, A339002.
Subsequence of A332821.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 22 2020
STATUS
approved
