login
Square root of smallest square starting with a string of n 9's.
3

%I #14 Oct 08 2019 11:23:52

%S 3,315,3161,31622,316227,3162277,31622776,316227765,316227766,

%T 31622776601,316227766016,3162277660167,31622776601683,

%U 316227766016837,3162277660168378,31622776601683792

%N Square root of smallest square starting with a string of n 9's.

%H Robert Israel, <a href="/A034994/b034994.txt">Table of n, a(n) for n = 1..998</a>

%e a(5) = 316227^2 = {99999}515529.

%p f:= proc(n) local d,q,x;

%p for d from n do

%p q:= 10^d-10^(d-n);

%p x:= isqrt(q);

%p if x^2 < q then x:= x+1 fi;

%p if x^2 < 10^d then return x fi

%p od

%p end proc:

%p map(f, [$1..20]); # _Robert Israel_, Sep 28 2018

%Y Cf. A034995.

%K nonn,base

%O 1,1

%A _Patrick De Geest_, Nov 15 1998

%E More terms from _Hans Havermann_, Jun 18 2001