OFFSET
1,1
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
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)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Jul 21 2004
STATUS
approved