OFFSET
1,1
COMMENTS
Sum of first 2n terms = 10^n. - Zak Seidov, Aug 05 2006
a(n)/a(n-1) ~ 10^(1/2). For the sequence giving the number of members of the sequence a(k)=k^r with n digits we have a(n)/a(n-1) ~ 10^(1/r). - Ctibor O. Zizka, Mar 09 2008
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..200
FORMULA
a(n) = ceiling(sqrt(10^n)) - ceiling(sqrt(10^(n-1))), n > 1.
EXAMPLE
a(1)=4 because there are 4 one-digit squares: 0,1,4,9. - Zak Seidov, Aug 05 2006
a(2)=6 because there are 6 two-digit squares: 16,25,36,49,64,81. - Zak Seidov, Aug 05 2006
22 squares (100=10^2, 121=11^2, ..., 961=31^2) have 3 digits, hence a(3)=22.
MAPLE
r:= proc(n, k) local b; b:= iroot(n, k); b+`if`(b^k<n, 1, 0) end:
a:= n-> r(10^n, 2) -r(10^(n-1), 2) +`if`(n=1, 1, 0):
seq(a(n), n=1..40); # Alois P. Heinz, Sep 12 2012
PROG
(PARI) je=[4]; for(n=2, 45, je=concat(je, ceil(sqrt(10^n))-ceil(sqrt(10^(n-1))))); je
(PARI) { default(realprecision, 200); for (n=1, 200, b=ceil(10^(n/2)); if (n>1, a=b - c, a=4); c=b; write("b062940.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 14 2009
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Amarnath Murthy, Jul 07 2001
EXTENSIONS
Corrected and extended by Dean Hickerson and Jason Earls, Jul 10 2001
Edited by R. J. Mathar, Aug 07 2008
STATUS
approved