OFFSET
0,3
EXAMPLE
There are 12 primes with four almost primes up to 100: 16,24,36,40,54,56,60,81,84,88,90&100.
MATHEMATICA
FourAlmostPrimePi[n_] := Sum[ PrimePi[n/(Prime@i*Prime@j*Prime@k)] - k + 1, {i, PrimePi[n^(1/4)]}, {j, i, PrimePi[(n/Prime@i)^(1/3)]}, {k, j, PrimePi@Sqrt[n/(Prime@i*Prime@j)]}]; Table[ FourAlmostPrimePi[n], {n, 0, 13}]
PROG
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot
def A114106(n): return sum(primepi(10**n//(k*m*r))-c for a, k in enumerate(primerange(integer_nthroot(10**n, 4)[0]+1)) for b, m in enumerate(primerange(k, integer_nthroot(10**n//k, 3)[0]+1), a) for c, r in enumerate(primerange(m, isqrt(10**n//(k*m))+1), b)) # Chai Wah Wu, Aug 17 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Feb 07 2006
EXTENSIONS
a(14) from Robert G. Wilson v, Jan 07 2007
a(15)-a(17) from Henri Lifchitz, Jul 21 2015
STATUS
approved