login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Smallest n-digit square starting with 9, or 0 if no such number exists.
8

%I #18 Mar 23 2021 05:39:23

%S 9,0,900,9025,90000,900601,9000000,90003169,900000000,9000127161,

%T 90000000000,900001331856,9000000000000,90000000369889,

%U 900000000000000,9000000036988900,90000000000000000,900000001801523401

%N Smallest n-digit square starting with 9, or 0 if no such number exists.

%F a(n+1) = (floor(sqrt(9*10^n)) + (n mod 2))^2, a(2)=0. - _Sascha Kurz_, Mar 18 2002

%F a(2k+1) = 9 * 10^(2k) for k >= 0. - _Bernard Schott_, Mar 23 2021

%o (PARI) a(n) = if (n==2, 0, (sqrtint(9*10^(n-1)) + (n-1) % 2)^2); \\ _Michel Marcus_, Mar 23 2021

%Y Cf. A000290, A035076 (roots), A045792.

%Y Cf. 2: A067472, 3: A067473, 4: A067474, 5: A067475, 6: A067476, 7: A067477, 8: A067478.

%K base,easy,nonn

%O 1,1

%A _Amarnath Murthy_, Feb 09 2002

%E More terms from _Sascha Kurz_, Mar 18 2002