login
A114453
Number of 5-almost primes less than or equal to 10^n.
15
0, 0, 4, 76, 963, 11185, 124465, 1349779, 14371023, 150982388, 1570678136, 16218372618, 166497674684, 1701439985694, 17323079621014
OFFSET
0,3
EXAMPLE
There are 4 five-almost primes up to 100: 32,48,72&80.
MATHEMATICA
FiveAlmostPrimePi[n_] := Sum[ PrimePi[n/(Prime@i*Prime@j*Prime@k*Prime@l)] - l + 1, {i, PrimePi[n^(1/5)]}, {j, i, PrimePi[(n/Prime@i)^(1/4)]}, {k, j, PrimePi[(n/(Prime@i*Prime@j))^(1/3)]}, {l, k, PrimePi[(n/(Prime@i*Prime@j*Prime@k))^(1/2)]}]; Table[ FiveAlmostPrimePi[10^n], {n, 0, 12}]
PROG
(Python)
from math import prod, isqrt
from sympy import primerange, integer_nthroot, primepi
def A114453(n):
def g(x, a, b, c, m): yield from (((d, ) for d in enumerate(primerange(b, isqrt(x//c)+1), a)) if m==2 else (((a2, b2), )+d for a2, b2 in enumerate(primerange(b, integer_nthroot(x//c, m)[0]+1), a) for d in g(x, a2, b2, c*b2, m-1)))
return int(sum(primepi(10**n//prod(c[1] for c in a))-a[-1][0] for a in g(10**n, 0, 1, 1, 5))) # Chai Wah Wu, Sep 18 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Feb 07 2006
EXTENSIONS
a(13) and a(14) from Robert G. Wilson v, Jan 07 2007
STATUS
approved