cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A377467 Number of perfect-powers x in the range 2^n < x < 2^(n+1).

Original entry on oeis.org

0, 0, 0, 1, 2, 2, 4, 6, 7, 10, 15, 23, 31, 41, 60, 81, 117, 165, 230, 321, 452, 634, 891, 1252, 1766, 2486, 3504, 4935, 6958, 9815, 13849, 19537, 27577, 38932, 54971, 77640, 109667, 154921, 218878, 309276, 437046, 617657, 872967, 1233895, 1744152, 2465546, 3485477
Offset: 0

Views

Author

Gus Wiseman, Nov 04 2024

Keywords

Comments

Perfect-powers (A001597) are numbers with a proper integer root, complement A007916.
Also the number of perfect-powers, except for powers of 2, with n bits.

Examples

			The perfect-powers in each prescribed range (rows):
    .
    .
    .
    9
   25   27
   36   49
   81  100  121  125
  144  169  196  216  225  243
  289  324  343  361  400  441  484
  529  576  625  676  729  784  841  900  961 1000
The binary expansions for n >= 3 (columns):
    1001  11001  100100  1010001  10010000  100100001
          11011  110001  1100100  10101001  101000100
                         1111001  11000100  101010111
                         1111101  11011000  101101001
                                  11100001  110010000
                                  11110011  110111001
                                            111100100
		

Crossrefs

The version for squarefree numbers is A077643.
The version for prime-powers is A244508.
For primes instead of powers of 2 we have A377432, zeros A377436.
Including powers of 2 in the range gives A377435.
The version for non-perfect-powers is A377701.
The union of all numbers counted is A377702.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289.
A007916 lists the non-perfect-powers, differences A375706.
A081676 gives the greatest perfect-power <= n.
A131605 lists perfect-powers that are not prime-powers.
A377468 gives the least perfect-power > n.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Table[Length[Select[Range[2^n+1,2^(n+1)-1],perpowQ]],{n,0,15}]
  • Python
    from sympy import mobius, integer_nthroot
    def A377467(n):
        def f(x): return int(1-sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        return f((1<Chai Wah Wu, Nov 05 2024

Formula

For n != 1, a(n) = A377435(n) - 1.

Extensions

a(26)-a(46) from Chai Wah Wu, Nov 05 2024

A377702 Perfect-powers except for powers of 2.

Original entry on oeis.org

9, 25, 27, 36, 49, 81, 100, 121, 125, 144, 169, 196, 216, 225, 243, 289, 324, 343, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1000, 1089, 1156, 1225, 1296, 1331, 1369, 1444, 1521, 1600, 1681, 1728, 1764, 1849, 1936, 2025, 2116, 2187, 2197
Offset: 1

Views

Author

Gus Wiseman, Nov 05 2024

Keywords

Comments

Perfect-powers (A001597) are numbers with a proper integer root, complement A007916.

Examples

			The terms together with their prime indices begin:
     9: {2,2}
    25: {3,3}
    27: {2,2,2}
    36: {1,1,2,2}
    49: {4,4}
    81: {2,2,2,2}
   100: {1,1,3,3}
   121: {5,5}
   125: {3,3,3}
   144: {1,1,1,1,2,2}
   169: {6,6}
   196: {1,1,4,4}
   216: {1,1,1,2,2,2}
   225: {2,2,3,3}
   243: {2,2,2,2,2}
   289: {7,7}
   324: {1,1,2,2,2,2}
		

Crossrefs

Including the powers of 2 gives A001597, counted by A377435.
For prime-powers we have A061345.
These terms are counted by A377467, for non-perfect-powers A377701.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A081676 gives the greatest perfect-power <= n.
A131605 lists perfect-powers that are not prime-powers.
A188951 counts perfect-powers less than 2^n.
A377468 gives the least perfect-power > n.

Programs

  • Mathematica
    Select[Range[1000],GCD@@FactorInteger[#][[All,2]]>1&&!IntegerQ[Log[2,#]]&]
  • Python
    from sympy import mobius, integer_nthroot
    def A377702(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n-2+x+(l:=x.bit_length())+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,l)))
        return bisection(f,n+1,n+1) # Chai Wah Wu, Nov 06 2024

A377701 Number of non-perfect-powers x in the range 2^n < x < 2^(n+1).

Original entry on oeis.org

0, 1, 3, 6, 13, 29, 59, 121, 248, 501, 1008, 2024, 4064, 8150, 16323, 32686, 65418, 130906, 261913, 523966, 1048123, 2096517, 4193412, 8387355, 16775449, 33551945, 67105359, 134212792, 268428497, 536861096, 1073727974, 2147464110, 4294939718, 8589895659
Offset: 0

Views

Author

Gus Wiseman, Nov 05 2024

Keywords

Comments

Non-perfect-powers (A007916) are numbers without a proper integer root.
Also the number of non-perfect-powers with n bits.

Examples

			The non-perfect-powers in each range (rows):
   .
   3
   5  6  7
  10 11 12 13 14 15
  17 18 19 20 21 22 23 24 26 28 29 30 31
Their binary expansions (columns):
  .  11  101  1010  10001
         110  1011  10010
         111  1100  10011
              1101  10100
              1110  10101
              1111  10110
                    10111
                    11000
                    11010
                    11100
                    11101
                    11110
                    11111
		

Crossrefs

The union of all numbers counted is A007916.
For squarefree numbers we have A077643.
For prime-powers we have A244508.
For primes instead of powers of 2 we have A377433, ones A029707.
For perfect-powers we have A377467, for primes A377432, zeros A377436.
A000225(n) counts the interval from A000051(n) to A000225(n+1).
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A081676 gives the greatest perfect-power <= n.
A131605 lists perfect-powers that are not prime-powers.
A377468 gives the least perfect-power > n.

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Table[Length[Select[Range[2^n+1, 2^(n+1)-1],radQ]],{n,0,15}]
  • Python
    from sympy import mobius, integer_nthroot
    def A377701(n):
        def f(x): return int(x-1+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        return f((1<Chai Wah Wu, Nov 06 2024

Formula

a(n) = 2^n-1-A377467(n). - Pontus von Brömssen, Nov 06 2024

Extensions

Offset corrected by, and a(16)-a(33) from Pontus von Brömssen, Nov 06 2024
Showing 1-3 of 3 results.