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 A377467 #16 Nov 06 2024 10:19:47 %S A377467 0,0,0,1,2,2,4,6,7,10,15,23,31,41,60,81,117,165,230,321,452,634,891, %T A377467 1252,1766,2486,3504,4935,6958,9815,13849,19537,27577,38932,54971, %U A377467 77640,109667,154921,218878,309276,437046,617657,872967,1233895,1744152,2465546,3485477 %N A377467 Number of perfect-powers x in the range 2^n < x < 2^(n+1). %C A377467 Perfect-powers (A001597) are numbers with a proper integer root, complement A007916. %C A377467 Also the number of perfect-powers, except for powers of 2, with n bits. %F A377467 For n != 1, a(n) = A377435(n) - 1. %e A377467 The perfect-powers in each prescribed range (rows): %e A377467 . %e A377467 . %e A377467 . %e A377467 9 %e A377467 25 27 %e A377467 36 49 %e A377467 81 100 121 125 %e A377467 144 169 196 216 225 243 %e A377467 289 324 343 361 400 441 484 %e A377467 529 576 625 676 729 784 841 900 961 1000 %e A377467 The binary expansions for n >= 3 (columns): %e A377467 1001 11001 100100 1010001 10010000 100100001 %e A377467 11011 110001 1100100 10101001 101000100 %e A377467 1111001 11000100 101010111 %e A377467 1111101 11011000 101101001 %e A377467 11100001 110010000 %e A377467 11110011 110111001 %e A377467 111100100 %t A377467 perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1; %t A377467 Table[Length[Select[Range[2^n+1,2^(n+1)-1],perpowQ]],{n,0,15}] %o A377467 (Python) %o A377467 from sympy import mobius, integer_nthroot %o A377467 def A377467(n): %o A377467 def f(x): return int(1-sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length()))) %o A377467 return f((1<<n+1)-1)-f((1<<n)) # _Chai Wah Wu_, Nov 05 2024 %Y A377467 The version for squarefree numbers is A077643. %Y A377467 The version for prime-powers is A244508. %Y A377467 For primes instead of powers of 2 we have A377432, zeros A377436. %Y A377467 Including powers of 2 in the range gives A377435. %Y A377467 The version for non-perfect-powers is A377701. %Y A377467 The union of all numbers counted is A377702. %Y A377467 A000040 lists the primes, differences A001223. %Y A377467 A000961 lists the powers of primes, differences A057820. %Y A377467 A001597 lists the perfect-powers, differences A053289. %Y A377467 A007916 lists the non-perfect-powers, differences A375706. %Y A377467 A081676 gives the greatest perfect-power <= n. %Y A377467 A131605 lists perfect-powers that are not prime-powers. %Y A377467 A377468 gives the least perfect-power > n. %Y A377467 Cf. A000015, A013597, A014210, A014234, A023055, A031218, A045542, A052410, A065514, A069623, A216765, A246655, A345531. %K A377467 nonn %O A377467 0,5 %A A377467 _Gus Wiseman_, Nov 04 2024 %E A377467 a(26)-a(46) from _Chai Wah Wu_, Nov 05 2024