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.

A114106 Number of 4-almost primes less than or equal to 10^n.

This page as a plain text file.
%I A114106 #17 Feb 02 2025 16:31:04
%S A114106 0,0,12,149,1712,18744,198062,2050696,20959322,212385942,2139236881,
%T A114106 21454599814,214499908019,2139634739326,21306682904040,
%U A114106 211905511283590,2105504493045818,20905484578206982,207458897819329031,2057931819347474462
%N A114106 Number of 4-almost primes less than or equal to 10^n.
%e A114106 There are 12 primes with four almost primes up to 100: 16, 24, 36, 40, 54, 56, 60, 81, 84, 88, 90 and 100, so a(2) = 12.
%t A114106 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}]
%o A114106 (Python)
%o A114106 from math import isqrt
%o A114106 from sympy import primepi, primerange, integer_nthroot
%o A114106 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
%Y A114106 Cf. A006880, A066265, A109251, A014613.
%K A114106 nonn
%O A114106 0,3
%A A114106 _Robert G. Wilson v_, Feb 07 2006
%E A114106 a(14) from _Robert G. Wilson v_, Jan 07 2007
%E A114106 a(15)-a(17) from _Henri Lifchitz_, Jul 21 2015
%E A114106 a(18)-a(19) from _Henri Lifchitz_, Feb 02 2025