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”).

A114106
Number of 4-almost primes less than or equal to 10^n.
16
0, 0, 12, 149, 1712, 18744, 198062, 2050696, 20959322, 212385942, 2139236881, 21454599814, 214499908019, 2139634739326, 21306682904040, 211905511283590, 2105504493045818, 20905484578206982
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