This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A339004 #22 Jul 27 2025 08:55:09 %S A339004 21,39,57,87,91,111,129,133,159,183,203,213,237,247,259,267,301,303, %T A339004 321,339,371,377,393,417,427,453,481,489,497,519,543,551,553,559,579, %U A339004 597,623,669,687,689,703,707,717,749,753,789,791,793,813,817,843,879,917 %N A339004 Numbers of the form prime(x) * prime(y) where x and y are distinct and both even. %C A339004 The squarefree semiprimes in A332821. - _Peter Munn_, Dec 25 2020 %F A339004 Numbers m such that A001221(m) = A001222(m) = 2 and A195017(m) = -2. - _Peter Munn_, Dec 31 2020 %e A339004 The sequence of terms together with their prime indices begins: %e A339004 21: {2,4} 267: {2,24} 543: {2,42} %e A339004 39: {2,6} 301: {4,14} 551: {8,10} %e A339004 57: {2,8} 303: {2,26} 553: {4,22} %e A339004 87: {2,10} 321: {2,28} 559: {6,14} %e A339004 91: {4,6} 339: {2,30} 579: {2,44} %e A339004 111: {2,12} 371: {4,16} 597: {2,46} %e A339004 129: {2,14} 377: {6,10} 623: {4,24} %e A339004 133: {4,8} 393: {2,32} 669: {2,48} %e A339004 159: {2,16} 417: {2,34} 687: {2,50} %e A339004 183: {2,18} 427: {4,18} 689: {6,16} %e A339004 203: {4,10} 453: {2,36} 703: {8,12} %e A339004 213: {2,20} 481: {6,12} 707: {4,26} %e A339004 237: {2,22} 489: {2,38} 717: {2,52} %e A339004 247: {6,8} 497: {4,20} 749: {4,28} %e A339004 259: {4,12} 519: {2,40} 753: {2,54} %t A339004 Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]==2&&OddQ[Times@@(1+ PrimePi/@First/@FactorInteger[#])]&] %o A339004 (Python) %o A339004 from math import isqrt %o A339004 from sympy import primepi, primerange %o A339004 def A339004(n): %o A339004 def bisection(f,kmin=0,kmax=1): %o A339004 while f(kmax) > kmax: kmax <<= 1 %o A339004 kmin = kmax >> 1 %o A339004 while kmax-kmin > 1: %o A339004 kmid = kmax+kmin>>1 %o A339004 if f(kmid) <= kmid: %o A339004 kmax = kmid %o A339004 else: %o A339004 kmin = kmid %o A339004 return kmax %o A339004 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) %o A339004 return bisection(f,n,n) # _Chai Wah Wu_, Apr 03 2025 %Y A339004 A338911 is the not necessarily squarefree version. %Y A339004 A339003 is the odd instead of even version, with not necessarily squarefree version A338910. %Y A339004 A001358 lists semiprimes, with odd/even terms A046315/A100484. %Y A339004 A005117 lists squarefree numbers. %Y A339004 A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484. %Y A339004 A289182/A115392 list the positions of odd/even terms in A001358. %Y A339004 A300912 lists products of pairs of primes with relatively prime indices. %Y A339004 A318990 lists products of pairs of primes with divisible indices. %Y A339004 A320656 counts factorizations into squarefree semiprimes. %Y A339004 A338898, A338912, and A338913 give the prime indices of semiprimes, with product A087794, sum A176504, and difference A176506. %Y A339004 A338899, A270650, and A270652 give the prime indices of squarefree semiprimes, with difference A338900. %Y A339004 A338904 groups semiprimes by weight. %Y A339004 A338906/A338907 list semiprimes of even/odd weight. %Y A339004 Cf. A000040, A001221, A001222, A056239, A112798, A166237, A195017, A320911, A338901, A338903, A339002. %Y A339004 Subsequence of A332821. %K A339004 nonn %O A339004 1,1 %A A339004 _Gus Wiseman_, Nov 22 2020