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 A377701 #17 Nov 10 2024 05:36:56 %S A377701 0,1,3,6,13,29,59,121,248,501,1008,2024,4064,8150,16323,32686,65418, %T A377701 130906,261913,523966,1048123,2096517,4193412,8387355,16775449, %U A377701 33551945,67105359,134212792,268428497,536861096,1073727974,2147464110,4294939718,8589895659 %N A377701 Number of non-perfect-powers x in the range 2^n < x < 2^(n+1). %C A377701 Non-perfect-powers (A007916) are numbers without a proper integer root. %C A377701 Also the number of non-perfect-powers with n bits. %F A377701 a(n) = 2^n-1-A377467(n). - _Pontus von Brömssen_, Nov 06 2024 %e A377701 The non-perfect-powers in each range (rows): %e A377701 . %e A377701 3 %e A377701 5 6 7 %e A377701 10 11 12 13 14 15 %e A377701 17 18 19 20 21 22 23 24 26 28 29 30 31 %e A377701 Their binary expansions (columns): %e A377701 . 11 101 1010 10001 %e A377701 110 1011 10010 %e A377701 111 1100 10011 %e A377701 1101 10100 %e A377701 1110 10101 %e A377701 1111 10110 %e A377701 10111 %e A377701 11000 %e A377701 11010 %e A377701 11100 %e A377701 11101 %e A377701 11110 %e A377701 11111 %t A377701 radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1; %t A377701 Table[Length[Select[Range[2^n+1, 2^(n+1)-1],radQ]],{n,0,15}] %o A377701 (Python) %o A377701 from sympy import mobius, integer_nthroot %o A377701 def A377701(n): %o A377701 def f(x): return int(x-1+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length()))) %o A377701 return f((1<<n+1)-1)-f((1<<n)) # _Chai Wah Wu_, Nov 06 2024 %Y A377701 The union of all numbers counted is A007916. %Y A377701 For squarefree numbers we have A077643. %Y A377701 For prime-powers we have A244508. %Y A377701 For primes instead of powers of 2 we have A377433, ones A029707. %Y A377701 For perfect-powers we have A377467, for primes A377432, zeros A377436. %Y A377701 A000225(n) counts the interval from A000051(n) to A000225(n+1). %Y A377701 A000961 lists the powers of primes, differences A057820. %Y A377701 A001597 lists the perfect-powers, differences A053289, seconds A376559. %Y A377701 A007916 lists the non-perfect-powers, differences A375706, seconds A376562. %Y A377701 A081676 gives the greatest perfect-power <= n. %Y A377701 A131605 lists perfect-powers that are not prime-powers. %Y A377701 A377468 gives the least perfect-power > n. %Y A377701 Cf. A000015, A013597, A014210, A014234, A023055, A045542, A052410, A061398, A304521, A377434, A377435, A377702. %K A377701 nonn %O A377701 0,3 %A A377701 _Gus Wiseman_, Nov 05 2024 %E A377701 Offset corrected by, and a(16)-a(33) from _Pontus von Brömssen_, Nov 06 2024