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 A036386 #44 Mar 22 2025 04:49:07 %S A036386 0,1,2,4,7,9,13,16,20,26,31,40,50,61,78,93,119,150,189,242,310,400, %T A036386 525,684,900,1190,1581,2117,2836,3807,5136,6948,9425,12811,17437, %U A036386 23788,32517,44512,60971,83640,114899,157948,217336,299360,412635,569193,785753,1085319,1500140,2074794,2870849,3974425,5504966 %N A036386 Number of prime powers (p^2, p^3, ...) <= 2^n. %H A036386 Amiram Eldar, <a href="/A036386/b036386.txt">Table of n, a(n) for n = 1..150</a> (terms 1..112 from Hiroaki Yamanouchi, terms 113..125 from Ray Chandler) %H A036386 <a href="/index/Pri#primepop">Index entries for sequences related to numbers of primes in various ranges</a>. %F A036386 a(n) = Sum_{j=2..n+1} pi(floor(2^(n/j))). The summation starts with squares (j=2); for arbitrary range (=y), the y^(1/j) argument has to be used. %e A036386 For n = 6, there are 9 prime powers not exceeding 2^6 = 64: 4, 8, 9, 16, 25, 27, 32, 49, 64, so a(6) = 9. %e A036386 For n = 25, a(25) = 900, pi(5792) + pi(322) + pi(76) + pi(32) + pi(17) + pi(11) + pi(8) + pi(6) + pi(5) + pi(4) + pi(4) + pi(3) + pi(3) + pi(3) + pi(2) + pi(2) + pi(2) + pi(2) + pi(2) + pi(2) + pi(2) + pi(2) + pi(2) + pi(2) + pi(1) = 760 + 66 + 21 + 11 + 7 + 5 + 4 + 3 + 3 + 2 + 2 + 2 + 2 + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 = 900. %t A036386 f[n_] := Length@ Union@ Flatten@ Table[ Prime[j]^k, {k, 2, n + 1}, {j, PrimePi[2^(n/k)]}]; Array[f, 46] (* _Robert G. Wilson v_, Jul 08 2011 *) %o A036386 (Python) %o A036386 from sympy import primepi, integer_nthroot %o A036386 def A036386(n): %o A036386 m = 1<<n %o A036386 return sum(primepi(integer_nthroot(m,j)[0]) for j in range(2,n+2)) # _Chai Wah Wu_, Jan 23 2025 %Y A036386 Cf. A000720, A007053, A029837, A036378-A036390, A060967, A060969, A060970, A060971, A122121, A246547. %K A036386 nonn %O A036386 1,3 %A A036386 _Labos Elemer_ %E A036386 More terms from _Labos Elemer_, May 07 2001 %E A036386 Terms a(47) and beyond from _Hiroaki Yamanouchi_, Nov 15 2016