A117934 Perfect powers (A001597) that are close, that is, between consecutive squares.
27, 32, 125, 128, 2187, 2197, 6434856, 6436343, 312079600999, 312079650687, 328080401001, 328080696273, 11305786504384, 11305787424768, 62854898176000, 62854912109375, 79723529268319, 79723537443243, 4550858390629024
Offset: 1
Keywords
Examples
27 and 32 are close because they are between 25 and 36.
Links
- Donovan Johnson, Table of n, a(n) for n = 1..360
- Daniel J. Bernstein, Detecting perfect powers in essentially linear time, Mathematics of Computation 67 (1998), pp. 1253-1283.
- John H. Loxton, Some problems involving powers of integers, Acta Arithmetica 46:2 (1986), pp. 113-123. See Bernstein, Corollary 19.5, for a correction to the proof of Theorem 1.
- StackExchange MathOverflow, Are there ever three perfect powers between consecutive squares? Answers by Gjergji Zaimi and Felipe Voloch (2011).
Crossrefs
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]
Comments