%I #27 Mar 12 2023 14:03:53
%S 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,
%T 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,
%U 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
%N Number of perfect powers between consecutive squares n^2 and (n+1)^2.
%C 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?
%H Charles R Greathouse IV, <a href="/A117896/b117896.txt">Table of n, a(n) for n = 1..10000</a>
%H J. H. Loxton, <a href="http://matwbn.icm.edu.pl/ksiazki/aa/aa46/aa4622.pdf">Some problems involving powers of integers</a>, Acta Arith., 46 (1986), pp. 113-123.
%H C. L. Stewart, <a href="http://doi.org/10.4064/aa133-2-1">On heights of multiplicatively dependent algebraic numbers</a>, Acta Arith. 133 (2008), pp. 97-108.
%H J. Turk, <a href="https://doi.org/10.1016/1385-7258(80)90044-X">Multiplicative properties of integers in short intervals</a>, Proc. Kon. Ned. Akad. Wet. (A) 83 (1980), pp. 429-436.
%F 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
%e a(5)=2 because powers 27 and 32 are between 25 and 36.
%t 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 *)
%o (PARI) a(n)=my(k);-sum(e=3,2*log(n+1)\log(2),k=round((n+1/2)^(2/e))^e;if(n^2<k&&k<(n+1)^2,moebius(e))) \\ _Charles R Greathouse IV_, Dec 19 2011
%Y Cf. A001597 (perfect powers), A014085 (primes between squares), A097055, A097056, A117934.
%K nonn
%O 1,5
%A _T. D. Noe_, Mar 31 2006, Feb 15 2010