A049416 Largest number whose square has n digits.
3, 9, 31, 99, 316, 999, 3162, 9999, 31622, 99999, 316227, 999999, 3162277, 9999999, 31622776, 99999999, 316227766, 999999999, 3162277660, 9999999999, 31622776601, 99999999999, 316227766016, 999999999999, 3162277660168
Offset: 1
Examples
31^2 = 961, but 32^2 = 1024, hence a(3) = 31. a(4) = 99: 99^2 = 9801 has 4 digits, while 100^2 = 10000 has 5 digits.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Programs
-
Magma
[Ceiling(Sqrt(10^n))-1: n in [1..30]]; // Vincenzo Librandi, Oct 01 2011
-
Mathematica
Ceiling[Sqrt[10^Range[40]]-1] (* Harvey P. Dale, Sep 30 2011 *)
Formula
a(n) = ceiling(sqrt(10^n)) - 1.
Extensions
More terms from Larry Reeves (larryr(AT)acm.org), May 16 2001
Comments