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.
%I A120035 #15 Mar 28 2025 18:25:59 %S A120035 0,0,0,1,1,5,7,20,37,81,173,344,736,1461,3065,6208,12643,25662,52014, %T A120035 105487,212566,430007,865650,1744136,3508335,7053390,14167804, %U A120035 28441899,57065447,114418462,229341261,459442819,920097130,1841946718,3686197728 %N A120035 Number of 4-almost primes f such that 2^n < f <= 2^(n+1). %C A120035 The partial sum equals the number of Pi_4(2^n) = A334069(n). %e A120035 (2^4, 2^5] there is one semiprime, namely 24. 16 was counted in the previous entry. %t A120035 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)]}]; t = Table[ FourAlmostPrimePi[2^n], {n, 0, 37}]; Rest@t - Most@t %o A120035 (Python) %o A120035 from math import isqrt %o A120035 from sympy import primepi, primerange, integer_nthroot %o A120035 def A120035(n): %o A120035 x = 1<<n %o A120035 y = x<<1 %o A120035 return sum(primepi(y//(k*m*r))-c for a,k in enumerate(primerange(integer_nthroot(y,4)[0]+1)) for b,m in enumerate(primerange(k,integer_nthroot(y//k,3)[0]+1),a) for c,r in enumerate(primerange(m,isqrt(y//(k*m))+1),b))-sum(primepi(x//(k*m*r))-c for a,k in enumerate(primerange(integer_nthroot(x,4)[0]+1)) for b,m in enumerate(primerange(k,integer_nthroot(x//k,3)[0]+1),a) for c,r in enumerate(primerange(m,isqrt(x//(k*m))+1),b)) # _Chai Wah Wu_, Mar 28 2025 %Y A120035 Cf. A014613, A082996, A114106, A036378, A120033 - A120043, A334069. %K A120035 nonn %O A120035 0,6 %A A120035 _Jonathan Vos Post_ and _Robert G. Wilson v_, Mar 20 2006