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

A097054 Nonsquare perfect powers.

Original entry on oeis.org

8, 27, 32, 125, 128, 216, 243, 343, 512, 1000, 1331, 1728, 2048, 2187, 2197, 2744, 3125, 3375, 4913, 5832, 6859, 7776, 8000, 8192, 9261, 10648, 12167, 13824, 16807, 17576, 19683, 21952, 24389, 27000, 29791, 32768, 35937, 39304, 42875, 50653
Offset: 1

Views

Author

Hugo Pfoertner, Jul 21 2004

Keywords

Comments

Terms of A001597 that are not in A000290.
All terms of this sequence are also in A070265 (odd powers), but omitting those odd powers that are also a square (e.g. 64=4^3=8^2).

Crossrefs

Cf. A001597 (perfect powers), A000290 (the squares), A008683, A070265 (odd powers), A097055, A097056, A239870, A239728, A093771.

Programs

  • Haskell
    import Data.Map (singleton, findMin, deleteMin, insert)
    a097054 n = a097054_list !! (n-1)
    a097054_list = f 9 (3, 2) (singleton 4 (2, 2)) where
       f zz (bz, be) m
        | xx < zz && even be =
                    f zz (bz, be+1) (insert (bx*xx) (bx, be+1) $ deleteMin m)
        | xx < zz = xx :
                    f zz (bz, be+1) (insert (bx*xx) (bx, be+1) $ deleteMin m)
        | xx > zz = 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, be)) = findMin m
    -- Reinhard Zumkeller, Mar 28 2014
    
  • Maple
    # uses code of A001597
    for n from 4 do
        if not issqr(n) and isA001597(n) then
            printf("%d,\n",n);
        end if;
    end do: # R. J. Mathar, Jan 13 2021
  • Mathematica
    nn = 50653; Select[Union[Flatten[Table[n^i, {i, Prime[Range[2, PrimePi[Log[2, nn]]]]}, {n, 2, nn^(1/i)}]]], ! IntegerQ[Sqrt[#]] &] (* T. D. Noe, Apr 19 2011 *)
  • PARI
    is(n)=ispower(n)%2 \\ Charles R Greathouse IV, Aug 28 2016
    
  • PARI
    list(lim)=my(v=List()); forprime(e=3,logint(lim\=1,2), for(b=2,sqrtnint(lim,e), if(!issquare(b), listput(v,b^e)))); Set(v) \\ Charles R Greathouse IV, Jan 09 2023
    
  • Python
    from sympy import mobius, integer_nthroot
    def A097054(n):
        def f(x): return int(n-1+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(3,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 14 2024

Formula

A052409(a(n)) is odd. - Reinhard Zumkeller, Mar 28 2014
Sum_{n>=1} 1/a(n) = 1 - zeta(2) + Sum_{k>=2} mu(k)*(1-zeta(k)) = 0.2295303015... - Amiram Eldar, Dec 21 2020

A340700 Lower of a pair of adjacent perfect powers, both with exponents > 2.

Original entry on oeis.org

27, 64, 125, 243, 1000, 1296, 2187, 50625, 59049, 194481, 279841, 456533, 614125, 3111696, 6434856, 22665187, 25411681, 38950081, 62742241, 96059601, 131079601, 418161601, 506250000, 741200625, 796594176, 1249198336, 2136719872, 2217342464, 5554571841, 5802782976
Offset: 1

Views

Author

Hugo Pfoertner, Jan 16 2021

Keywords

Comments

It is conjectured that the intersection of A340700 and A340701 is empty, i.e., that no 3 immediately consecutive perfect powers with all exponents > 2 (A076467) exist. No counterexample < 3.4*10^30 was found.

Examples

			Initial terms of sequences A340700 .. A340706:
a(n) = x^p,
A340701(n) = A340703(n)^A340705(n) = y^q,
A340706(n) = A340701(n) - a(n) = y^q - x^p.
.
  n  a(n)    x ^  p  A340701    y ^  q  A340706 adjacent squares
  1    27 =  3 ^  3,      32 =  2 ^  5,      5  5^2=25, 6^2=36
  2    64 =  2 ^  6,      81 =  3 ^  4,     17  8^2=64, 9^2=81
  3   125 =  5 ^  3,     128 =  2 ^  7,      3  11^2=121, 12^2=144
  4   243 =  3 ^  5,     256 =  2 ^  8,     13  15^2=225, 16^2=256
  5  1000 = 10 ^  3,    1024 =  2 ^ 10,     24  31^2=961, 32^2=1024
  6  1296 =  6 ^  4,    1331 = 11 ^  3,     35  36^2=1296, 37^2=1369
  7  2187 =  3 ^  7,    2197 = 13 ^  3,     10  46^2=2116, 47^2=2209
  8 50625 = 15 ^  4,   50653 = 37 ^  3,     28  225^2=50625, 226^2=51076
  9 59049 =  3 ^ 10,   59319 = 39 ^  3,    270  243^2=59049, 244^2=59536
		

Crossrefs

The corresponding upper members of the pairs are A340701.
Cf. A117934 (excluding pairs where one of the members is a square).

Formula

a(n) = A340702(n)^A340704(n) = A340701(n) - A340706(n).

A117934 Perfect powers (A001597) that are close, that is, between consecutive squares.

Original entry on oeis.org

27, 32, 125, 128, 2187, 2197, 6434856, 6436343, 312079600999, 312079650687, 328080401001, 328080696273, 11305786504384, 11305787424768, 62854898176000, 62854912109375, 79723529268319, 79723537443243, 4550858390629024
Offset: 1

Views

Author

T. D. Noe, Apr 03 2006

Keywords

Comments

It appears that all pairs of close powers involve a cube. For three pairs, the other power is a 7th power. For all remaining pairs, the other power is a 5th power. If this is true, then three powers are never close.
For the first 360 terms, 176 pairs are a cube and a 5th power. The remaining four pairs are a cube and a 7th power. - Donovan Johnson, Feb 26 2011
Loxton proves that the interval [n, n+sqrt(n)] contains at most exp(40 log log n log log log n) powers for n >= 16, and hence there are at most 2*exp(40 log log n log log log n) between consecutive squares in the interval containing n. - Charles R Greathouse IV, Jun 25 2017

Examples

			27 and 32 are close because they are between 25 and 36.
		

Crossrefs

Cf. A097056, A117896 (number of perfect powers between consecutive squares n^2 and (n+1)^2).

Programs

  • Mathematica
    nMax=10^14; lst={}; log2Max=Ceiling[Log[2,nMax]]; bases=Table[2,{log2Max}]; powers=bases^Range[log2Max]; powers[[1]]=Infinity; currPP=1; cnt=0; While[nextPP=Min[powers]; nextPP <= nMax, pos=Flatten[Position[powers,nextPP]]; If[MemberQ[pos,2], cnt=0, cnt++ ]; If[cnt>1, AppendTo[lst,{currPP,nextPP}]]; Do[k=pos[[i]]; bases[[k]]++; powers[[k]]=bases[[k]]^k, {i,Length[pos]}]; currPP=nextPP]; Flatten[lst]

A097055 Numbers n such that the interval n^2 < x < (n+1)^2 contains at least one nonsquare perfect power A097054.

Original entry on oeis.org

2, 5, 11, 14, 15, 18, 22, 31, 36, 41, 45, 46, 52, 55, 58, 70, 76, 82, 88, 89, 90, 96, 103, 110, 117, 129, 132, 140, 148, 156, 164, 172, 181, 189, 198, 207, 225, 234, 243, 252, 262, 272, 279, 281, 291, 301, 311, 316, 322, 332, 353, 362, 364, 374, 385, 396, 401
Offset: 1

Views

Author

Hugo Pfoertner, Jul 21 2004

Keywords

Examples

			a(1)=2 because 2^2<2^3<3^2, a(2)=5: 5^2<3^3<2^5<6^2, a(3)=11: 11^2<5^3<2^7<12^2.
		

Crossrefs

Programs

  • Mathematica
    nn=1000^2; pp=Select[Union[Flatten[Table[n^i, {i,Prime[Range[2,PrimePi[Log[2,nn]]]]}, {n,2,nn^(1/i)}]]], !IntegerQ[Sqrt[#]]&]; Union[Floor[Sqrt[pp]]] (* T. D. Noe, Apr 19 2011 *)
  • PARI
    is(n)=my(n2=n^2,t=n2+2*n); for(e=3,logint(t,2), if(sqrtnint(t,e)^e>n2, return(1))); 0 \\ Charles R Greathouse IV, Aug 28 2016
    
  • Python
    from itertools import count, islice
    from sympy import mobius, integer_nthroot
    def A097055_gen(startvalue=2): # generator of terms >= startvalue
        return filter(lambda n: sum(mobius(k)*(1-integer_nthroot((n+1)**2,k)[0]) for k in range((n**2).bit_length(),((n+1)**2).bit_length()))+sum(mobius(k)*(integer_nthroot(n**2,k)[0]-integer_nthroot((n+1)**2,k)[0]) for k in range(3,(n**2).bit_length())), count(max(startvalue,2)))
    A097055_list = list(islice(A097055_gen(),30)) # Chai Wah Wu, Aug 14 2024

Formula

a(n) ~ n^(3/2). - Charles R Greathouse IV, Aug 28 2016

A117896 Number of perfect powers between consecutive squares n^2 and (n+1)^2.

Original entry on oeis.org

0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0
Offset: 1

Views

Author

T. D. Noe, Mar 31 2006, Feb 15 2010

Keywords

Comments

a(n)=2 only 14 times for n^2 < 2^63. What is the least n such that a(n)=3? Is a(n) bounded?

Examples

			a(5)=2 because powers 27 and 32 are between 25 and 36.
		

Crossrefs

Cf. A001597 (perfect powers), A014085 (primes between squares), A097055, A097056, A117934.

Programs

  • Mathematica
    nn=151^2; powers=Join[{1}, Union[Flatten[Table[n^i, {i,Prime[Range[PrimePi[Log[2,nn]]]]}, {n,2,nn^(1/i)}]]]]; t=Table[0,{Sqrt[nn]-1}]; Do[n=Floor[Sqrt[i]]; If[i>n^2, t[[n]]++], {i,powers}]; t (* revised, T. D. Noe, Apr 19 2011 *)
  • PARI
    a(n)=my(k);-sum(e=3,2*log(n+1)\log(2),k=round((n+1/2)^(2/e))^e;if(n^2Charles R Greathouse IV, Dec 19 2011

Formula

Trivially, a(n) << log n/log log n. Turk gives a(n) << sqrt(log n) and Loxton improves this to a(n) <= exp(40 sqrt(log log n log log log n)). Stewart improves the constant from 40 to 30 and conjectures that a(n) < 3 for all but finitely many n. - Charles R Greathouse IV, Dec 11 2012

A173341 Numbers n such that n^5 and a cube are between consecutive squares.

Original entry on oeis.org

2, 23, 199, 201, 408, 575, 603, 1354, 1628, 4995, 5745, 7320, 7994, 12634, 42637, 44217, 45962, 67132, 82131, 82351, 91116, 91134, 146521, 177682, 229863, 359373, 394826, 458908, 462763, 512012, 665719, 728982, 1009965, 1156978, 1450803
Offset: 1

Views

Author

T. D. Noe, Feb 16 2010

Keywords

Comments

This sequence appears to be infinite. Sequence A117594 is a subsequence. The corresponding sequence for n^7 is A173342. Are there ever more than two perfect powers between consecutive squares?

Examples

			2 is here because 2^5=32 and 3^3=27 are between 5^2=25 and 6^2=36.
23 is here because 23^5 and 186^3 are between 2536^2 and 2537^2.
199 is here because 199^5 and 6783^3 are between 558640^2 and 558641^2.
		

Crossrefs

Programs

  • Mathematica
    t={}; Do[n2=Floor[n^(5/2)]; n3=Round[n^(5/3)]; If[n2^2
    				

A173342 Numbers n such that n^7 and a cube are between consecutive squares.

Original entry on oeis.org

2, 3, 498, 2266144, 272585923
Offset: 1

Views

Author

T. D. Noe, Feb 16 2010

Keywords

Comments

No other terms < 10^8. The corresponding sequence for n^5 is A173341. Are there ever more than two perfect powers between consecutive squares?
a(6) > 10^10. [From Donovan Johnson, Apr 17 2010]

Examples

			2 is here because 2^7=128 and 5^3=125 are between 11^2=121 and 12^2=144.
3 is here because 3^7=2187 and 13^3=2197 are between 46^2=2116 and 47^2=2209.
498 is here because 498^7 and 1965781^3 are between 2756149047^2 and 2756149048^2.
2266144 is here because 2266144^7 and 674534510965903^3 are between 17518876914709436673663^2 and 17518876914709436673664^2.
		

Crossrefs

Programs

  • Mathematica
    t={}; Do[n2=Floor[n^(7/2)]; n3=Round[n^(7/3)]; If[n2^2
    				

Extensions

a(5) from Donovan Johnson, Apr 17 2010

A289690 Least k such that there are exactly n perfect powers between 10k and 10k + 10.

Original entry on oeis.org

5, 1, 2, 12, 0
Offset: 0

Views

Author

Wolfram Hüttermann, Jul 09 2017

Keywords

Comments

I do not know if a(5) exists. If it does, the numbers 10k+1, 10k+3, 10k+5, 10k+7, 10k+9 will be perfect powers. But those numbers are very scarce.
Further, a(6), ..., a(10) cannot exist because of the Mihailescu theorem, as the only adjoining perfect powers are 8 and 9.
a(5) is extremely unlikely to exist; if it does, it is larger than 10^70. - Charles R Greathouse IV, Jul 21 2017

Examples

			If n=2, then there are 2 power numbers between 20 and 30: 25 and 27, and this is the least k with this property.
		

Crossrefs

Programs

  • PARI
    a(n)=my(k=0); while(sum(j=10*k+1, 10*k+9, (j==1) || ispower(j)) !=n, k++); k; \\ Michel Marcus, Jul 20 2017
Showing 1-8 of 8 results.