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.

This page as a plain text file.
%I A109251 #25 Sep 18 2024 15:46:21
%S A109251 0,1,22,247,2569,25556,250853,2444359,23727305,229924367,2227121996,
%T A109251 21578747909,209214982913,2030133769624,19717814526785,
%U A109251 191693417109381,1865380637252270,18168907486812690,177123437184971927,1728190923820610000
%N A109251 Number of numbers up to 10^n which are products of three primes.
%F A109251 a(n) = A072114(10^n). - _R. J. Mathar_, May 25 2008
%e A109251 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.
%t A109251 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_ *)
%o A109251 (Python)
%o A109251 from math import isqrt
%o A109251 from sympy import primepi, primerange, integer_nthroot
%o A109251 def A109251(n):
%o A109251     r = 10**n
%o A109251     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
%Y A109251 Cf. A014612 = numbers with three prime factors, A036352 = number of numbers up to 10^n which are products of two primes, A072114.
%K A109251 nonn
%O A109251 0,3
%A A109251 _Martin Raab_, Aug 19 2005
%E A109251 a(10)-a(14) from _Robert G. Wilson v_, Feb 06 2006
%E A109251 a(15)-a(17) from _Hiroaki Yamanouchi_, Aug 30 2014
%E A109251 a(18)-a(19) from _Henri Lifchitz_, Dec 01 2014