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.

Previous Showing 21-30 of 39 results. Next

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

Original entry on oeis.org

1, 0, 1, 2, 3, 3, 5, 7, 8, 11, 16, 24, 32, 42, 61, 82, 118, 166, 231, 322, 453, 635, 892, 1253, 1767, 2487, 3505, 4936, 6959, 9816, 13850, 19538, 27578, 38933, 54972, 77641, 109668, 154922, 218879, 309277, 437047, 617658, 872968, 1233896, 1744153, 2465547, 3485478
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 with n bits.

Examples

			The perfect-powers in each prescribed range (rows):
    1
    .
    4
    8    9
   16   25   27
   32   36   49
   64   81  100  121  125
  128  144  169  196  216  225  243
  256  289  324  343  361  400  441  484
  512  529  576  625  676  729  784  841  900  961 1000
Their binary expansions (columns):
  1  .  100  1000  10000  100000  1000000  10000000  100000000
             1001  11001  100100  1010001  10010000  100100001
                   11011  110001  1100100  10101001  101000100
                                  1111001  11000100  101010111
                                  1111101  11011000  101101001
                                           11100001  110010000
                                           11110011  110111001
                                                     111100100
		

Crossrefs

The union of all numbers counted is A001597, without powers of two A377702.
The version for squarefree numbers is A077643.
These are the first differences of A188951.
The version for prime-powers is A244508.
For primes instead of powers of 2 we have A377432, zeros A377436.
Not counting powers of 2 gives A377467.
The version for non-perfect-powers is A377701.
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,2^(n+1)-1],perpowQ]],{n,0,15}]
  • Python
    from sympy import mobius, integer_nthroot
    def A377435(n):
        if n==0: return 1
        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) = A377467(n) + 1.

Extensions

a(26)-a(46) from Chai Wah Wu, Nov 05 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

A062965 Positive numbers which are one less than a perfect square that is also another power.

Original entry on oeis.org

15, 63, 80, 255, 624, 728, 1023, 1295, 2400, 4095, 6560, 9999, 14640, 15624, 16383, 20735, 28560, 38415, 46655, 50624, 59048, 65535, 83520, 104975, 117648, 130320, 159999, 194480, 234255, 262143, 279840, 331775, 390624, 456975, 531440, 614655
Offset: 1

Views

Author

Jason Earls, Jul 16 2001

Keywords

Examples

			a(2) = 63 because the perfect square 64 = 8^2 = 4^3.
		

References

  • William Dunham, Euler: The Master of Us All, The Mathematical Association of America, Washington D.C., 1999, p. 65.
  • Leonhard Euler, "Variae observationes circa series infinitas," Opera Omnia, Ser. 1, Vol. 14, pp. 216-244.
  • Nicolao Fvss, "Demonstratio Theorematvm Qvorvndam Analyticorvm," Nova Acta Academiae Scientiarum Imperialis Petropolitanae, 8 (1794) 223-226.

Crossrefs

Programs

  • Mathematica
    Take[ Select[ Range[ 2, 150 ], GCD@@(Last/@FactorInteger[ # ])>1& ]^2-1] (* corrected by Jon Maiga, Sep 28 2019 *)
  • Python
    from sympy import mobius, integer_nthroot
    def A062965(n):
        def f(x): return int(n-1+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax**2-1 # Chai Wah Wu, Aug 14 2024

Formula

From Terry D. Grant, Oct 25 2020: (Start)
a(n) = A001597(n+1)^2 - 1.
Sum_{k>=1} 1/a(k) = 7/4 - Pi^2/6 = 7/4 - zeta(2).
Sum_{k>=1} 1/(a(k)+1) = Sum_{k>=2} mu(k)*(1-zeta(2*k)).
(End)

Extensions

More terms from Dean Hickerson, Jul 24 2001

A340588 Squares of perfect powers.

Original entry on oeis.org

1, 16, 64, 81, 256, 625, 729, 1024, 1296, 2401, 4096, 6561, 10000, 14641, 15625, 16384, 20736, 28561, 38416, 46656, 50625, 59049, 65536, 83521, 104976, 117649, 130321, 160000, 194481, 234256, 262144, 279841, 331776, 390625, 456976, 531441, 614656, 707281, 810000, 923521, 1000000
Offset: 1

Views

Author

Terry D. Grant, Sep 21 2020

Keywords

Crossrefs

Cf. A153158 (complement within positive squares).

Programs

  • Maple
    q:= n-> is(igcd(seq(i[2], i=ifactors(n)[2]))<>2):
    select(q, [i^2$i=1..1000])[];  # Alois P. Heinz, Nov 26 2024
  • Mathematica
    Join[{1}, (Select[Range[2000], GCD @@ FactorInteger[#][[All, 2]] > 1 &])^2]
  • Python
    from sympy import mobius, integer_nthroot
    def A340588(n):
        def f(x): return int(n-2+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax**2 # Chai Wah Wu, Aug 14 2024

Formula

a(n) = A001597(n)^2.
a(n+1) = A062965(n) + 1. - Hugo Pfoertner, Sep 29 2020
Sum_{k>1} 1/(a(k) - 1) = 7/4 - Pi^2/6 = 7/4 - zeta(2).
Sum_{k>1} 1/a(k) = Sum_{k>=2} mu(k)*(1-zeta(2*k)).

A380446 Perfect powers k^m, m > 1, omega(k) > 1, such that A053669(k) > A006530(k), where omega = A001221.

Original entry on oeis.org

36, 144, 216, 324, 576, 900, 1296, 1728, 2304, 2916, 3600, 5184, 5832, 7776, 8100, 9216, 11664, 13824, 14400, 20736, 22500, 26244, 27000, 32400, 36864, 44100, 46656, 57600, 72900, 82944, 90000, 104976, 110592, 129600, 147456, 157464, 176400, 186624, 202500, 216000
Offset: 1

Views

Author

Michael De Vlieger, Jul 25 2025

Keywords

Comments

Perfect powers k^m, m > 1, for k in A055932.
Union of {k^m : rad(k) | P(i), m >= 2}, rad = A007947, P = A002110. Therefore perfect powers in A033845, A143207, A147571, A147572, etc. are proper subsets.
Terms are even. For a(n) such that omega(a(n)) > 2, a(n) mod 10 = 0, where omega = A001221.

Examples

			Table of n, a(n) for select n, showing exponents m of prime power factors p^m | a(n) for primes p listed in the heading. Terms that also appear in A368682 are marked by "#":
                         Exponents
 n      a(n)             2.3.5.7.11
-----------------------------------
 1       36 =    6^2  #  2.2
 2      144 =   12^2  #  4.2
 3      216 =    6^3  #  3.3
 4      324 =   18^2     2.4
 5      576 =   24^2  #  6.2
 6      900 =   30^2  #  2.2.2
 7     1296 =    6^4  #  4.4
 8     1728 =   12^3  #  6.3
 9     2304 =   48^2  #  8.2
10     2916 =   54^2     2.6
11     3600 =   60^2  #  4.2.2
12     5184 =   72^2  #  6.4
26    44100 =  210^2  #  2.2.2.2
90  5336100 = 2310^2  #  2.2.2.2.2
		

Crossrefs

Programs

  • Mathematica
    (* Load linked Mathematica algorithm, then: *)
    Select[Union@ Flatten[a055932[7][[3 ;; -1, 2 ;; -1]] ], And[Divisible[#1, Apply[Times, #2[[All, 1]] ]^2], GCD @@ #2[[All, -1]] > 1] & @@ {#, FactorInteger[#]} &]

Formula

Intersection of A131605 and A055932 = A304250 \ A246547.

A366854 Powers k^m such that k is neither squarefree nor prime powers, and m > 1.

Original entry on oeis.org

144, 324, 400, 576, 784, 1296, 1600, 1728, 1936, 2025, 2304, 2500, 2704, 2916, 3136, 3600, 3969, 4624, 5184, 5625, 5776, 5832, 6400, 7056, 7744, 8000, 8100, 8464, 9216, 9604, 9801, 10000, 10816, 11664, 12544, 13456, 13689, 13824, 14400, 15376, 15876, 17424, 18225
Offset: 1

Views

Author

Michael De Vlieger, Jan 01 2024

Keywords

Comments

Analogous to A303606 = { k^m : Omega(k) = omega(k) > 1, m > 1 }, i.e., squarefree composite k (in A120944) raised to m > 1. Proper subset of A131605, itself a proper subset of A286708, which is in turn a proper subset of A126706. This sequence does not intersect Achilles numbers A052486.

Examples

			Let b(n) = A126706(n).
a(1) = b(1)^2 = 12^2 = 144. Since 144 = 2^4*3^2, it is both powerful and a perfect power.
a(2) = b(2)^2 = 18^2 = 324.
a(3) = b(3)^2 = 20^2 = 400.
a(8) = b(1)^3 = 12^3 = 1728, etc.
		

Crossrefs

Programs

  • Mathematica
    nn = 20000; i = 1; k = 2;
    MapIndexed[Set[S[First[#2]], #1] &,
      Select[Range@ Sqrt[nn], Nor[SquareFreeQ[#], PrimePowerQ[#]] &] ];
    Union@ Reap[
      While[j = 2;
        While[S[i]^j < nn, Sow[S[i]^j]; j++]; j > 2,
        k++; i++] ][[-1, 1]]

Formula

This sequence is A126706(i)^m, m > 1.
A131605 = union of {1}, A303606, and {a(n)}.
A286708 = union of A303606, {a(n)}, and A052486.
A001597 = union of {1}, A246547, A303606, and {a(n)}.
A001694 = union of A246547, A303606, {a(n)}, and A052486.

A368681 Products of primorials that are perfect powers.

Original entry on oeis.org

1, 4, 8, 16, 32, 36, 64, 128, 144, 216, 256, 512, 576, 900, 1024, 1296, 1728, 2048, 2304, 3600, 4096, 5184, 7776, 8192, 9216, 13824, 14400, 16384, 20736, 27000, 32400, 32768, 36864, 44100, 46656, 57600, 65536, 82944, 110592, 129600, 131072, 147456, 176400, 186624
Offset: 1

Views

Author

Michael De Vlieger, Jan 02 2024

Keywords

Comments

Intersection of A025487 and A001597.
Contains A365308 (perfect powers of composite primorials), A368508 (perfect powers of composite superprimorials), and A368682.
These numbers are perfect powers of some smaller product of primorials.

Examples

			Let b(n) = A025487(n).
a(1) = b(1) = 1 = 1^k = b(1)^k, k >= 2,
a(2) = b(3) = 4 = 2^2 = b(2)^2,
a(3) = b(5) = 8 = 2^3 = b(2)^3,
a(6) = b(11) = 36 = 6^2 = b(4)^2,
a(9) = b(19) = 144 = 12^2 = b(6)^2, etc.
2 is not in the sequence since 2 is squarefree and not in A001597.
		

Crossrefs

Programs

  • Mathematica
    {1}~Join~Select[Range[4, 200000, 2], Or[PrimePowerQ[#], And[Union@ Differences@ PrimePi@ #1 == {1}, AllTrue[Union@ Differences@ #2, # <= 0 &], GCD @@ #2 > 1] & @@ Transpose@ FactorInteger[#]] &]

A377043 The n-th perfect-power A001597(n) minus the n-th power of a prime A000961(n).

Original entry on oeis.org

0, 2, 5, 5, 11, 18, 19, 23, 25, 36, 48, 64, 81, 98, 100, 101, 115, 138, 164, 179, 184, 200, 209, 240, 271, 284, 300, 336, 374, 413, 439, 450, 495, 542, 587, 632, 683, 738, 793, 852, 887, 903, 964, 1029, 1097, 1165, 1194, 1230, 1295, 1370, 1443, 1518, 1561
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2024

Keywords

Comments

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

Crossrefs

Excluding 1 from the powers of primes gives A377044.
A000015 gives the least prime-power >= n.
A031218 gives the greatest prime-power <= n.
A000040 lists the primes, differences A001223.
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.
A024619 lists the non-prime-powers, differences A375735, seconds A376599.
A025475 lists numbers that are both a perfect-power and a prime-power.
A080101 counts prime-powers between primes (exclusive).
A106543 lists numbers that are neither a perfect-power nor a prime-power.
A131605 lists perfect-powers that are not prime-powers.
A246655 lists the prime-powers, complement A361102 (differences A375708).
Prime-power runs: A373675, min A373673, max A373674, length A174965.
Prime-power antiruns: A373576, min A120430, max A006549, length A373671.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    per=Select[Range[1000],perpowQ];
    per-NestList[NestWhile[#+1&,#+1,!PrimePowerQ[#]&]&,1,Length[per]-1]
  • Python
    from sympy import mobius, primepi, integer_nthroot
    def A377043(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-1+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        def g(x): return int(n-1+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        return bisection(f,n,n)-bisection(g,n,n) # Chai Wah Wu, Oct 27 2024

Formula

a(n) = A001597(n) - A000961(n).

A377044 The n-th perfect-power A001597(n) minus the n-th prime-power A246655(n).

Original entry on oeis.org

-1, 1, 4, 4, 9, 17, 18, 21, 23, 33, 47, 62, 77, 96, 98, 99, 113, 137, 159, 175, 182, 196, 207, 236, 265, 282, 297, 333, 370, 411, 433, 448, 493, 536, 579, 628, 681, 734, 791, 848, 879, 899, 962, 1028, 1094, 1159, 1192, 1220, 1293, 1364, 1437, 1514, 1559, 1591
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2024

Keywords

Comments

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

Crossrefs

Including 1 with the prime-powers gives A377043.
A000015 gives the least prime-power >= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820, A093555, A376596.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A024619 lists the non-prime-powers, differences A375735, seconds A376599.
A025475 lists numbers that are both a perfect-power and a prime-power.
A031218 gives the greatest prime-power <= n.
A080101 counts prime-powers between primes (exclusive).
A106543 lists numbers that are neither a perfect-power nor a prime-power.
A131605 lists perfect-powers that are not prime-powers.
A246655 lists the prime-powers, complement A361102, A375708.
Prime-power runs: A373675, min A373673, max A373674, length A174965.
Prime-power antiruns: A373576, min A120430, max A006549, length A373671.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    per=Select[Range[1000],perpowQ];
    per-NestList[NestWhile[#+1&, #+1,!PrimePowerQ[#]&]&,2,Length[per]-1]
  • Python
    from sympy import mobius, primepi, integer_nthroot
    def A377044(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-1+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        def g(x): return int(n+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        return bisection(f,n,n)-bisection(g,n,n) # Chai Wah Wu, Oct 27 2024

Formula

a(n) = A001597(n) - A246655(n).

A379158 Numbers m such that the consecutive prime powers A246655(m) and A246655(m+1) are both prime.

Original entry on oeis.org

1, 4, 8, 11, 12, 16, 19, 20, 21, 24, 25, 28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 45, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 71, 72, 73, 74, 75, 76, 79, 80, 81, 82, 83, 84, 87, 88, 89, 92, 93, 94, 95, 96, 97, 98, 99, 100
Offset: 1

Views

Author

Gus Wiseman, Dec 23 2024

Keywords

Comments

Also positions of 2 in A366835.

Examples

			The 4th and 5th prime powers are 5 and 7, which are both prime, so 4 is in the sequence.
The 12th and 13th prime powers are 19 and 23, which are both prime, so 12 is in the sequence.
		

Crossrefs

Positions of adjacent primes in A246655 (prime powers).
Positions of 2 in A366835.
For just one prime we have A379155, positions of prime powers in A379157.
For no primes we have A379156, positions of prime powers in A068315.
The primes powers themselves are A379541.
A000015 gives the least prime power >= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A031218 gives the greatest prime power <= n.
A065514 gives the greatest prime power < prime(n), difference A377289.
A131605 finds perfect powers that are not prime powers.
A366833 counts prime powers between primes, see A053607, A304521.

Programs

  • Mathematica
    v=Select[Range[100],PrimePowerQ];
    Select[Range[Length[v]-1],PrimeQ[v[[#]]]&&PrimeQ[v[[#+1]]]&]

Formula

A246655(a(n)) = A379541(n).
Previous Showing 21-30 of 39 results. Next