%I #17 Apr 30 2015 16:35:55
%S 29,399,4999,59999,699999,7999999,89999999,999999998,1099999999,
%T 11999999999,129999999999,1399999999999,14999999999999,
%U 159999999999999,1699999999999999,17999999999999999,189999999999999997
%N Largest n-digit squarefree number beginning with n.
%C Let d = n - number of digits in n. Question: Is n*10^d -1 always a squarefree number?
%C If 9 divides n-1, then 9 divides n*10^d-1, so it is not squarefree. - _Enrique PĂ©rez Herrero_, Apr 15 2015
%p a:= proc(n) local d,k;
%p d:= ilog10(n)+1;
%p for k from (n+1)*10^(n-d)-1 by -1 do
%p if numtheory:-issqrfree(k) then return(k) fi
%p od
%p end proc:
%p seq(a(n), n=2..50); # _Robert Israel_, Apr 17 2015
%Y Cf. A077513.
%K base,nonn
%O 2,1
%A _Amarnath Murthy_, Nov 08 2002
%E More terms from _Sascha Kurz_, Jan 04 2003
|