cp's OEIS Frontend

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.

A339004 Numbers of the form prime(x) * prime(y) where x and y are distinct and both even.

Original entry on oeis.org

21, 39, 57, 87, 91, 111, 129, 133, 159, 183, 203, 213, 237, 247, 259, 267, 301, 303, 321, 339, 371, 377, 393, 417, 427, 453, 481, 489, 497, 519, 543, 551, 553, 559, 579, 597, 623, 669, 687, 689, 703, 707, 717, 749, 753, 789, 791, 793, 813, 817, 843, 879, 917
Offset: 1

Views

Author

Gus Wiseman, Nov 22 2020

Keywords

Comments

The squarefree semiprimes in A332821. - Peter Munn, Dec 25 2020

Examples

			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}
		

Crossrefs

A338911 is the not necessarily squarefree version.
A339003 is the odd instead of even version, with not necessarily squarefree version A338910.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A005117 lists squarefree numbers.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A289182/A115392 list the positions of odd/even terms in A001358.
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.
A338906/A338907 list semiprimes of even/odd weight.
Subsequence of A332821.

Programs

  • Mathematica
    Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]==2&&OddQ[Times@@(1+ PrimePi/@First/@FactorInteger[#])]&]
  • 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

Formula

Numbers m such that A001221(m) = A001222(m) = 2 and A195017(m) = -2. - Peter Munn, Dec 31 2020