login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A124283
4-almost primes indexed by primes.
8
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,1
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.
LINKS
FORMULA
a(n) = 4almostprime(prime(n)) = A014613(A000040(n)).
EXAMPLE
a(1) = 4almostprime(prime(1)) = 4almostprime(2) = 24.
a(2) = 4almostprime(prime(2)) = 4almostprime(3) = 36.
a(3) = 4almostprime(prime(3)) = 4almostprime(5) = 54.
PROG
(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
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Oct 24 2006
EXTENSIONS
a(17)-a(50) from Giovanni Resta, Jun 13 2016
STATUS
approved