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 A304521 #23 Jan 19 2025 17:21:40 %S A304521 1,2,3,4,8,9,17,26,47,81,142,264,474,883,1629,3045,5735,10780,20429, %T A304521 38688,73654,140426,268341,513867,986034,1894410,3646135,7027826, %U A304521 13562626,26208249,50698866,98184468,190338062,369326691,717271794,1394198587,2712112562 %N A304521 a(n) is the number of prime powers k such that ceiling(log_2(k)) = n. %C A304521 Prime powers are defined as numbers of the form p^k with p prime and k >= 1 (A246655). %H A304521 Chai Wah Wu, <a href="/A304521/b304521.txt">Table of n, a(n) for n = 1..92</a> %e A304521 a(1)=1 because the interval [2,2] contains 1 prime power: 2. %e A304521 a(2)=2 because the interval [3,4] contains 2 prime powers: 3 and 4=2^2. %e A304521 a(3)=3 because the prime powers in [5,8] are 5, 7, and 8=2^3. %o A304521 (PARI) a(n) = sum(k=2^(n-1)+1, 2^n, isprimepower(k) != 0); \\ _Michel Marcus_, May 17 2018 %o A304521 (Python) %o A304521 from sympy import primepi, integer_nthroot %o A304521 def A304521(n): %o A304521 def f(x): %o A304521 m = 1<<x %o A304521 return int(sum(primepi(integer_nthroot(m,k)[0]) for k in range(1,x+1))) %o A304521 return f(n)-f(n-1) # _Chai Wah Wu_, Jan 19 2025 %Y A304521 Cf. A029837, A036378, A246655. %K A304521 nonn %O A304521 1,2 %A A304521 _Jon E. Schoenfield_, May 13 2018