A097055 Numbers n such that the interval n^2 < x < (n+1)^2 contains at least one nonsquare perfect power A097054.
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
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.
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
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