login
A097055
Numbers n such that the interval n^2 < x < (n+1)^2 contains at least one nonsquare perfect power A097054.
4
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,1
FORMULA
a(n) ~ n^(3/2). - Charles R Greathouse IV, Aug 28 2016
EXAMPLE
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.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Jul 21 2004
STATUS
approved