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.

A109251 Number of numbers up to 10^n which are products of three primes.

Original entry on oeis.org

0, 1, 22, 247, 2569, 25556, 250853, 2444359, 23727305, 229924367, 2227121996, 21578747909, 209214982913, 2030133769624, 19717814526785, 191693417109381, 1865380637252270, 18168907486812690, 177123437184971927, 1728190923820610000
Offset: 0

Views

Author

Martin Raab, Aug 19 2005

Keywords

Examples

			There are 22 numbers with three prime factors up to 10^2: 8, 12, 18, 20, 27, 28, 30, 42, 44, 45, 50, 52, 63, 66, 68, 70, 75, 76, 78, 92, 98, 99.
		

Crossrefs

Cf. A014612 = numbers with three prime factors, A036352 = number of numbers up to 10^n which are products of two primes, A072114.

Programs

  • Mathematica
    ThreeAlmostPrimePi[n_] := Sum[ PrimePi[n/(Prime@i*Prime@j)] - j + 1, {i, PrimePi[n^(1/3)]}, {j, i, PrimePi@ Sqrt[n/Prime@i]}]; Table[ ThreeAlmostPrimePi[10^n], {n, 0, 14}] (* Robert G. Wilson v *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A109251(n):
        r = 10**n
        return int(sum(primepi(r//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(r,3)[0]+1)) for b,m in enumerate(primerange(k,isqrt(r//k)+1),a))) # Chai Wah Wu, Sep 18 2024

Formula

a(n) = A072114(10^n). - R. J. Mathar, May 25 2008

Extensions

a(10)-a(14) from Robert G. Wilson v, Feb 06 2006
a(15)-a(17) from Hiroaki Yamanouchi, Aug 30 2014
a(18)-a(19) from Henri Lifchitz, Dec 01 2014