login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A049415 Number of squares (of positive integers) with n digits. 9

%I #20 Sep 08 2022 08:44:58

%S 3,6,22,68,217,683,2163,6837,21623,68377,216228,683772,2162278,

%T 6837722,21622777,68377223,216227767,683772233,2162277661,6837722339,

%U 21622776602,68377223398,216227766017,683772233983,2162277660169

%N Number of squares (of positive integers) with n digits.

%C a(n) + A180426(n) + A180429(n) + A180347(n) = A052268(n).

%C Lim_{n->infinity} a(2n)/10^n = 1 - 1/sqrt(10);

%C lim_{n->infinity} a(2n-1)/10^n = 1/sqrt(10) - 1/10. - _Robert G. Wilson v_, Aug 29 2012

%H Vincenzo Librandi, <a href="/A049415/b049415.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = ceiling(sqrt(10^n)) - ceiling(sqrt(10^(n-1))).

%F From _Jon E. Schoenfield_, Nov 30 2019: (Start)

%F a(2n) = floor(10^n * (1 - 1/sqrt(10))), so each even-indexed term a(2n) is given by the first n digits (after the decimal point) of 1 - 1/sqrt(10) = 0.68377223398316...;

%F a(2n-1) = ceiling(10^n * (1/sqrt(10) - 1/10)), so each odd-indexed term a(2n-1) is given by the first n digits (after the decimal point) of 1/sqrt(10) - 1/10 = 0.21622776601683..., plus 1. (End)

%e 22 squares (100=10^2, 121=11^2, ...., 961=31^2) have 3 digits, hence a(3)=22.

%t f[n_] := Ceiling[Sqrt[10^n - 1]] - Ceiling[Sqrt[10^(n - 1)]]; f[1] = 3; Array[f, 24] (* _Robert G. Wilson v_, Aug 29 2012 *)

%o (Magma) [Ceiling(Sqrt(10^n))-Ceiling(Sqrt(10^(n-1))) : n in [1..30]]; // _Vincenzo Librandi_, Oct 01 2011

%Y A049415(n) = A017936(n+1) - A017936(n) = A049416(n+1) - A049416(n).

%Y Cf. A062940.

%K nonn,easy,base

%O 1,1

%A Ulrich Schimke (ulrschimke(AT)aol.com)

%E More terms from _Dean Hickerson_, Jul 10 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:43 EDT 2024. Contains 371967 sequences. (Running on oeis4.)