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.

A124317 Semiprimes indexed by 3-almost primes.

Original entry on oeis.org

22, 34, 51, 57, 82, 85, 87, 123, 133, 134, 146, 158, 201, 205, 209, 214, 221, 226, 237, 295, 305, 309, 321, 327, 341, 361, 365, 371, 394, 395, 413, 447, 478, 481, 497, 501, 529, 533, 543, 545, 551, 554, 559, 583, 597, 614, 623, 635, 689, 699, 734, 763, 766
Offset: 1

Views

Author

Jonathan Vos Post, Oct 26 2006

Keywords

Comments

Note that a(10)-a(9) = a(30)-a(29) = 1, achieving the minimum possible, due to a combination of the appropriate semiprime gap (A065516) and 3-almost prime gap (A114403).

Examples

			a(1) = semiprime(3almostprime(1)) = semiprime(8 = 2^3) = 22 = 2 * 11.
a(2) = semiprime(3almostprime(2)) = semiprime(12 = 2^2 * 3) = 34 = 2 * 17.
a(3) = semiprime(3almostprime(3)) = semiprime(18 = 2 * 3^2) = 51 = 3 * 17.
		

Crossrefs

Cf. A124318 3-almost primes indexed by semiprimes. A124319 semiprime(3almostprime(n)) - 3almostprime(semiprime(n)). A124308 Primes indexed by 5-almost primes. A124309 5-almost primes indexed by primes. A124310 prime(5almostprime(n)) - 5almostprime(prime(n)). 4-almost primes indexed by primes = A124283. prime(4almostprime(n)) - 4almostprime(prime(n)) = A124284. Primes indexed by 3-almost primes = A124268. 3-almost primes indexed by primes = A124269. prime(3almostprime(n)) - 3almostprime(prime(n)) = A124270. See also A106349 Primes indexed by semiprimes. See also A106350 Semiprimes indexed by primes. See also A122824 Prime(semiprime(n)) - semiprime(prime(n)). Commutator [A000040, A001358] at n.

Programs

  • Mathematica
    p[k_] := Select[Range[1000], PrimeOmega[#] == k &]; p[2][[Take[p[3], 60]]] (* Giovanni Resta, Jun 13 2016 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A124317(n):
        def f(x): return int(x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1)) for b,m in enumerate(primerange(k,isqrt(x//k)+1),a)))
        def g(x): return int(x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        m, k = n, f(n)+n
        while m != k:
            m, k = k, f(k)+n
        r, k = m, g(m)+m
        while r != k:
            r, k = k, g(k)+m
        return r # Chai Wah Wu, Aug 17 2024

Formula

a(n) = semiprime(3almostprime(n)) = A001358(A014612(n)).

Extensions

Data corrected by Giovanni Resta, Jun 13 2016