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-9 of 9 results.

A001597 Perfect powers: m^k where m > 0 and k >= 2.

Original entry on oeis.org

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, 1024, 1089, 1156, 1225, 1296, 1331, 1369, 1444, 1521, 1600, 1681, 1728, 1764
Offset: 1

Views

Author

Keywords

Comments

Might also be called the nontrivial powers. - N. J. A. Sloane, Mar 24 2018
See A175064 for number of ways to write a(n) as m^k (m >= 1, k >= 1). - Jaroslav Krizek, Jan 23 2010
a(1) = 1, for n >= 2: a(n) = numbers m such that sum of perfect divisors of x = m has no solution. Perfect divisor of n is divisor d such that d^k = n for some k >= 1. a(n) for n >= 2 is complement of A175082. - Jaroslav Krizek, Jan 24 2010
A075802(a(n)) = 1. - Reinhard Zumkeller, Jun 20 2011
Catalan's conjecture (now a theorem) is that 1 occurs just once as a difference, between 8 and 9.
For a proof of Catalan's conjecture, see the paper by Metsänkylä. - L. Edson Jeffery, Nov 29 2013
m^k is the largest number n such that (n^k-m)/(n-m) is an integer (for k > 1 and m > 1). - Derek Orr, May 22 2014
From Daniel Forgues, Jul 22 2014: (Start)
a(n) is asymptotic to n^2, since the density of cubes and higher powers among the squares and higher powers is 0. E.g.,
a(10^1) = 49 (49% of 10^2),
a(10^2) = 6400 (64% of 10^4),
a(10^3) = 804357 (80.4% of 10^6),
a(10^4) = 90706576 (90.7% of 10^8),
a(10^n) ~ 10^(2n) - o(10^(2n)). (End)
A proper subset of A001694. - Robert G. Wilson v, Aug 11 2014
a(10^n): 1, 49, 6400, 804357, 90706576, 9565035601, 979846576384, 99066667994176, 9956760243243489, ... . - Robert G. Wilson v, Aug 15 2014

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 66.
  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section D9.
  • René Schoof, Catalan's Conjecture, Springer-Verlag, 2008, p. 1.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Complement of A007916.
Subsequence of A072103; A072777 is a subsequence.
Union of A075109 and A075090.
There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2), and which are sometimes confused with the present sequence.
First differences give A053289.

Programs

  • Haskell
    import Data.Map (singleton, findMin, deleteMin, insert)
    a001597 n = a001597_list !! (n-1)
    (a001597_list, a025478_list, a025479_list) =
       unzip3 $ (1, 1, 2) : f 9 (3, 2) (singleton 4 (2, 2)) where
       f zz (bz, ez) m
        | xx < zz = (xx, bx, ex) :
                    f zz (bz, ez+1) (insert (bx*xx) (bx, ex+1) $ deleteMin m)
        | xx > zz = (zz, bz, 2) :
                    f (zz+2*bz+1) (bz+1, 2) (insert (bz*zz) (bz, 3) m)
        | otherwise = f (zz+2*bz+1) (bz+1, 2) m
        where (xx, (bx, ex)) = findMin m  --  bx ^ ex == xx
    -- Reinhard Zumkeller, Mar 28 2014, Oct 04 2012, Apr 13 2012
    
  • Magma
    [1] cat [n : n in [2..1000] | IsPower(n) ];
    
  • Maple
    isA001597 := proc(n)
        local e ;
        e := seq(op(2,p),p=ifactors(n)[2]) ;
        return ( igcd(e) >=2 or n =1 ) ;
    end proc:
    A001597 := proc(n)
        option remember;
        local a;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA001597(a) then
                    return a ;
                end if;
             end do;
        end if;
    end proc:
    seq(A001597(n),n=1..70) ; # R. J. Mathar, Jun 07 2011
    N:= 10000: # to get all entries <= N
    sort({1,seq(seq(a^b, b = 2 .. floor(log[a](N))), a = 2 .. floor(sqrt(N)))}); # Robert FERREOL, Jul 18 2023
  • Mathematica
    min = 0; max = 10^4;  Union@ Flatten@ Table[ n^expo, {expo, Prime@ Range@ PrimePi@ Log2@ max}, {n, Floor[1 + min^(1/expo)], max^(1/expo)}] (* T. D. Noe, Apr 18 2011; slightly modified by Robert G. Wilson v, Aug 11 2014 *)
    perfectPowerQ[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1; Select[Range@ 1765, perfectPowerQ] (* Ant King, Jun 29 2013; slightly modified by Robert G. Wilson v, Aug 11 2014 *)
    nextPerfectPower[n_] := If[n == 1, 4, Min@ Table[ (Floor[n^(1/k)] + 1)^k, {k, 2, 1 + Floor@ Log2@ n}]]; NestList[ nextPerfectPower, 1, 55] (* Robert G. Wilson v, Aug 11 2014 *)
    Join[{1},Select[Range[2000],GCD@@FactorInteger[#][[All,2]]>1&]] (* Harvey P. Dale, Apr 30 2018 *)
  • PARI
    {a(n) = local(m, c); if( n<2, n==1, c=1; m=1; while( cMichael Somos, Aug 05 2009 */
    
  • PARI
    is(n)=ispower(n) || n==1 \\ Charles R Greathouse IV, Sep 16 2015
    
  • PARI
    list(lim)=my(v=List(vector(sqrtint(lim\=1),n,n^2))); for(e=3,logint(lim,2), for(n=2,sqrtnint(lim,e), listput(v,n^e))); Set(v) \\ Charles R Greathouse IV, Dec 10 2019
    
  • Python
    from sympy import perfect_power
    def ok(n): return n==1 or perfect_power(n)
    print([m for m in range(1, 1765) if ok(m)]) # Michael S. Branicky, Jan 04 2021
    
  • Python
    import sympy
    class A001597() :
        def _init_(self) :
            self.a = [1]
        def at(self, n):
            if n <= len(self.a):
                return self.a[n-1]
            else:
                cand = self.at(n-1)+1
                while sympy.perfect_power(cand) == False:
                    cand += 1
                self.a.append(cand)
                return cand
    a001597 = A001597()
    for n in range(1,20):
        print(a001597.at(n)) # R. J. Mathar, Mar 28 2023
    
  • Python
    from sympy import mobius, integer_nthroot
    def A001597(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 # Chai Wah Wu, Aug 13 2024
  • Sage
    def A001597_list(n) :
        return [k for k in (1..n) if k.is_perfect_power()]
    A001597_list(1764) # Peter Luschny, Feb 03 2012
    

Formula

Goldbach showed that Sum_{n >= 2} 1/(a(n)-1) = 1.
Formulas from postings to the Number Theory List by various authors, 2002:
Sum_{i >= 2} Sum_{j >= 2} 1/i^j = 1;
Sum_{k >= 2} 1/(a(k)+1) = Pi^2 / 3 - 5/2;
Sum_{k >= 2} 1/a(k) = Sum_{n >= 2} mu(n)(1- zeta(n)) approx = 0.87446436840494... See A072102.
For asymptotics see Newman.
For n > 1: gcd(exponents in prime factorization of a(n)) > 1, cf. A124010. - Reinhard Zumkeller, Apr 13 2012
a(n) ~ n^2. - Thomas Ordowski, Nov 04 2012
a(n) = n^2 - 2*n^(5/3) - 2*n^(7/5) + (13/3)*n^(4/3) - 2*n^(9/7) + 2*n^(6/5) - 2*n^(13/11) + o(n^(13/11)) (Jakimczuk, 2012). - Amiram Eldar, Jun 30 2023

Extensions

Minor corrections from N. J. A. Sloane, Jun 27 2010

A023055 (Apparently) differences between adjacent perfect powers (integers of form a^b, a >= 1, b >= 2).

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 30, 32, 33, 35, 36, 37, 38, 39, 40, 41, 43, 45, 47, 48, 49, 51, 53, 55, 56, 57, 59, 60, 61, 63, 65, 67, 68, 69, 71, 73, 74, 75, 76, 77, 79, 80, 81, 83, 85, 87, 89, 92, 93, 94, 95, 97, 99, 100
Offset: 1

Views

Author

Keywords

Comments

Catalan's conjecture (now a theorem) is that 1 occurs just once as a difference, between 8 and 9.

Crossrefs

Cf. A189117 (conjectured number of pairs of consecutive perfect powers differing by n).

A074981 Conjectured list of positive numbers which are not of the form r^i - s^j, where r,s,i,j are integers with r>0, s>0, i>1, j>1.

Original entry on oeis.org

6, 14, 34, 42, 50, 58, 62, 66, 70, 78, 82, 86, 90, 102, 110, 114, 130, 134, 158, 178, 182, 202, 206, 210, 226, 230, 238, 246, 254, 258, 266, 274, 278, 290, 302, 306, 310, 314, 322, 326, 330, 358, 374, 378, 390, 394, 398, 402, 410, 418, 422, 426
Offset: 1

Views

Author

Zak Seidov, Oct 07 2002

Keywords

Comments

This is a famous hard problem and the terms shown are only conjectured values.
The terms shown are not the difference of two powers below 10^19. - Don Reble
One can immediately represent all odd numbers and multiples of 4 as differences of two squares. - Don Reble
_Ed Pegg Jr_ remarks (Oct 07 2002) that the techniques of Preda Mihailescu (see MathWorld link) might make it possible to prove that 6, 14, ... are indeed members of this sequence.
Numbers n such that there is no solution to Pillai's equation. - T. D. Noe, Oct 12 2002
The terms shown are not the difference of two powers below 10^27. - Mauro Fiorentini, Jan 03 2020

Examples

			Examples showing that certain numbers are not in the sequence: 10 = 13^3 - 3^7, 22 = 7^2 - 3^3, 29 = 15^2 - 14^2, 31 = 2^5 - 1, 52 = 14^2 - 12^2, 54 = 3^4 - 3^3, 60 = 2^6 - 2^2, 68 = 10^2 - 2^5, 72 = 3^4 - 3^2, 76 = 5^3 - 7^2, 84 = 10^2 - 2^4, ... 342 = 7^3 - 1^2, ...
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, Sections D9 and B19.
  • P. Ribenboim, Catalan's Conjecture, Academic Press NY 1994.
  • T. N. Shorey and R. Tijdeman, Exponential Diophantine Equations, Cambridge University Press, 1986.

Crossrefs

Subsequence of A016825 (see second comment of Don Reble).
n such that A076427(n) = 0. [Corrected by Jonathan Sondow, Apr 14 2014]
For a count of the representations of a number as the difference of two perfect powers, see A076427. The numbers that appear to have unique representations are listed in A076438.
For sequence with similar definition, but allowing negative powers, see A066510.

Extensions

Corrected by Don Reble and Jud McCranie, Oct 08 2002. Corrections were also sent in by Neil Fernandez, David W. Wilson, and Reinhard Zumkeller.

A245713 Sorted imperfect powers b^p with b > 0, p > 2, with multiplicity.

Original entry on oeis.org

1, 8, 16, 27, 32, 64, 64, 81, 125, 128, 216, 243, 256, 256, 343, 512, 512, 625, 729, 729, 1000, 1024, 1024, 1296, 1331, 1728, 2048, 2187, 2197, 2401, 2744, 3125, 3375, 4096, 4096, 4096, 4096, 4913, 5832, 6561, 6561, 6859, 7776, 8000, 8192, 9261
Offset: 1

Views

Author

Anatoly E. Voevudko, Jul 30 2014

Keywords

Comments

No multiple terms for b=1.
This sequence strictly follows requirements of the Beal conjecture.
Less than 550 of these powers satisfy 196 Beal's conjecture equations.

Crossrefs

Programs

  • Maple
    N:= 10^5: # to get all terms <= N
    L:= [1, seq(seq(b^p, p=3..floor(log[b](N))),b=2..floor(N^(1/3)))]:
    sort(L); # Robert Israel, Nov 09 2015
  • Mathematica
    mx = 10000; Join[{1}, Sort@ Flatten@ Table[b^p, {b, 2, Sqrt@ mx}, {p, 3, Log[b, mx]}]] (* Robert G. Wilson v, Nov 09 2015 *)
  • PARI
    A245713(lim)={my(L=List(1),lim2=logint(lim,2));for(p=3,lim2, for(b=2,sqrtnint(lim,p),listput(L, b^p);));listsort(L); print(L);} \\ Anatoly E. Voevudko, Sep 21 2015

A189117 Conjectured number of pairs of consecutive perfect powers (A001597) differing by n.

Original entry on oeis.org

1, 1, 2, 3, 1, 0, 2, 1, 3, 1, 2, 1, 3, 0, 2, 1, 5, 2, 3, 1, 1, 0, 1, 2, 1, 2, 1, 3, 0, 1, 0, 1, 1, 0, 2, 1, 1, 1, 3, 1, 1, 0, 1, 0, 1, 0, 3, 1, 2, 0, 1, 0, 2, 0, 2, 1, 1, 0, 1, 2, 1, 0, 1, 0, 3, 0, 2, 2, 1, 0, 2, 0, 2, 1, 1, 1, 1, 0, 3, 1, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 0, 1, 1, 1, 2, 0, 2, 0, 1, 5
Offset: 1

Views

Author

T. D. Noe, Apr 16 2011

Keywords

Comments

Only a(1) is proved. Perfect powers examined up to 10^21. This is similar to A076427, but more restrictive.
Hence, through 10^21, there is only one value in the sequence: Semiprimes which are both one more than a perfect power and one less than another perfect power. This is to perfect powers A001597 approximately as A108278 is to squares. A more exact analogy would be to the set of integers such as 30^2 = 900 since 900-1 = 899 = 29 * 31, and 900+1 = 901 = 17 * 53. A189045 INTERSECTION A189047. a(1) = 26 because 26 = 2 * 13 is semiprime, 26-1 = 25 = 5^2, and 26+1 = 27 = 3^3. - Jonathan Vos Post, Apr 16 2011
Pillai's conjecture is that a(n) is finite for all n. - Charles R Greathouse IV, Apr 30 2012

Examples

			1 = 3^2 - 2^3;
2 = 3^3 - 2^5;
3 = 2^2 - 1^2 = 2^7 - 5^3;
4 = 2^3 - 2^2 = 6^2 - 2^5 = 5^3 - 11^2.
		

Crossrefs

Cf. A023056 (least k such that k and k+n are consecutive perfect powers).
Cf. A023057 (conjectured n such that a(n)=0).

Programs

  • Mathematica
    nn = 10^12; pp = Join[{1}, Union[Flatten[Table[n^i, {i, 2, Log[2, nn]}, {n, 2, nn^(1/i)}]]]]; d = Select[Differences[pp], # <= 100 &]; Table[Count[d, n], {n, 100}]

A074980 Numbers which are not of the form m^p - n^q where p = 2 or 3, q = 2 or 3.

Original entry on oeis.org

6, 10, 14, 34, 42, 46, 50, 58, 62, 66, 70, 78, 82, 86, 90, 102, 110, 114, 122, 130, 134, 158, 162, 166, 178, 182, 194, 202, 206, 210, 214, 226, 230, 234, 238, 246, 250, 254, 258, 266, 274, 278, 290, 302, 306, 310, 314, 322, 326, 330, 338, 354, 358, 374, 378
Offset: 1

Views

Author

Zak Seidov, Oct 07 2002

Keywords

Comments

This is a famous hard problem and the terms shown are only conjectured values.
Checked for squares and cubes through 1.134*10^25.

Examples

			146 is not in the sequence because 146 = 195^3-2723^2.
		

Crossrefs

Cf. A074981.

Extensions

Corrected and extended by Jud McCranie, Oct 10 2002

A066510 Conjectured list of positive numbers which are not of the form r^i-s^j, where r,s,i,j are integers with i>1, j>1.

Original entry on oeis.org

6, 14, 34, 42, 58, 62, 66, 70, 78, 86, 90, 102, 110, 114, 130, 158, 178, 182, 202, 210, 230, 238, 254, 258, 266, 274, 278, 302, 306, 310, 314, 322, 326, 330, 358, 374, 378, 390, 394, 398, 402, 410, 418, 422, 426, 430, 434, 438, 446, 450, 454
Offset: 1

Views

Author

Don Reble, Oct 12 2002

Keywords

Comments

This is a famous hard problem and the terms shown are only conjectured values.
The terms shown are not the difference of two powers below 10^19. - Don Reble
One can immediately represent the odd numbers and the multiples of four as differences of two squares. - Don Reble
The terms shown are not the difference of two powers below 10^27. - Mauro Fiorentini, Jan 08 2020

Examples

			Examples showing that certain numbers are not in the sequence: 10 = 13^3-3^7, 22 = 7^2 - 3^3, 29 = 15^2 - 14^2, 31 = 2^5 - 1, 52 = 14^2 - 12^2, 54 = 3^4 - 3^3, 60 = 2^6 - 2^2, 68 = 10^2 - 2^5, 72 = 3^4 - 3^2, 76 = 5^3 - 7^2, 84 = 10^2 - 2^4, ...
50 = 7^2 - -1^3, 82 = 9^2 - -1^3, 226 = 15^2 - -1^3, 246 = 11^2 - -5^3, 290 = 17^2 - -1^3, ... [Typos corrected by _Gerry Myerson_, May 14 2008]
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, Sections D9 and B19.

Crossrefs

For sequence with similar definition, but restricted to positive values of r and s, see A074981.

A077286 Primes which are not the difference between two successive perfect powers (A001597).

Original entry on oeis.org

29, 31, 179, 181, 281, 313, 379, 397, 487, 563, 839, 883, 907, 929, 953, 977, 997, 1049, 1171, 1567, 1823, 2213, 2339, 2371, 2383, 2729, 2749, 2897, 2999, 3067, 3137, 3313, 3529, 3637, 3823, 4591, 4789, 4871, 4951, 5197, 5237, 5279, 5531, 5573, 5741
Offset: 1

Views

Author

Robert G. Wilson v, Oct 31 2002

Keywords

Examples

			29 is not the difference between two successive perfect powers.
		

Crossrefs

Programs

  • Mathematica
    pp = Union[ Join[{1}, Flatten[ Table[n^i, {n, 2, Sqrt[10^12]}, {i, 2, Log[n, 10^12]}]]]]; l = Length[pp]; d = Sort[Take[pp, -l + 1] - Take[pp, l - 1]]; a = {}; Do[ If[ PrimeQ[ d[[n]]], a = Append[a, d[[n]]]], {n, 1, l - 1}]; Complement[ Table[ Prime[i], {i, 1, 760}], Take[ Union[a], 760]]

A087646 a(n) is the first term of the first run of exactly n non-perfect-powers.

Original entry on oeis.org

26, 2, 5, 28, 0, 10, 97337, 17, 2188, 3126, 2198, 37, 0, 50, 129, 65, 226, 82, 197, 101, 0, 2026, 1001, 145, 42850, 170, 485, 0, 6860, 0, 7745, 257, 0, 290, 1729, 14348908, 1332, 362, 2705, 401, 0, 442, 0, 9217, 0, 530, 21905
Offset: 1

Views

Author

Lekraj Beedassy, Sep 23 2003

Keywords

Examples

			a(3)=5 because (5,6,7) is the smallest consecutive triple of non-powers, followed by (33,34,35), (122,123,124), ...
The zeros above are conjectured and correspond to terms of A023057.
		

Crossrefs

A complement to A001597.

Extensions

Edited by Don Reble, Sep 26 2003
Showing 1-9 of 9 results.