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.

A124283 4-almost primes indexed by primes.

Original entry on oeis.org

24, 36, 54, 60, 90, 104, 136, 150, 189, 225, 232, 294, 308, 328, 344, 375, 441, 459, 488, 510, 516, 550, 570, 621, 676, 708, 714, 738, 748, 776, 852, 860, 884, 910, 999, 1014, 1060, 1096, 1112, 1161, 1197, 1206, 1256, 1274, 1284, 1290, 1356, 1432, 1450, 1482
Offset: 1

Views

Author

Jonathan Vos Post, Oct 24 2006

Keywords

Comments

Primes indexed by 4-almost primes = A124282. 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.

Examples

			a(1) = 4almostprime(prime(1)) = 4almostprime(2) = 24.
a(2) = 4almostprime(prime(2)) = 4almostprime(3) = 36.
a(3) = 4almostprime(prime(3)) = 4almostprime(5) = 54.
		

Crossrefs

Programs

  • Python
    from math import isqrt
    from sympy import prime, primepi, integer_nthroot, primerange
    def A124283(n):
        def f(x): return int(prime(n)+x-sum(primepi(x//(k*m*r))-c for a, k in enumerate(primerange(integer_nthroot(x, 4)[0]+1)) for b, m in enumerate(primerange(k, integer_nthroot(x//k, 3)[0]+1), a) for c, r in enumerate(primerange(m, isqrt(x//(k*m))+1), b)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f,n,n) # Chai Wah Wu, Sep 09 2024

Formula

a(n) = 4almostprime(prime(n)) = A014613(A000040(n)).

Extensions

a(17)-a(50) from Giovanni Resta, Jun 13 2016