How many square numbers exist that have the length $N$ in the decimal system? How many square numbers exist that have the length $N$ in the decimal system?
E.g. for the length $N=1$ there exist 4 square numbers (0, 1, 4, 9).
Thank you
 A: $N=2$ squares are $10-4=6$. For $N=3$ squares are $31-10=21$...
If we call $q(N)$ the number of squares with $N$ digits then 
$q(N)=\left\lceil\sqrt{10^N}\right\rceil-\left\lceil\sqrt{10^{N-1}}\right\rceil$
A: A number $m$ has $d$ digits when
$$10^{d-1}\le m<10^d.$$
A perfect square $n^2$ has $d$ digits when
$$10^{d-1}\le n^2<10^d$$ or $$\sqrt{10}^{d-1}\le n<\sqrt{10}^d.$$
Turning to integer bounds,
$$\left\lceil\sqrt{10}^{d-1}\right\rceil\le n<\left\lceil\sqrt{10}^d\right\rceil$$ gives you the answer.

Note that we can distinguish two cases on the parity of $d$:


*

*$d:=2k-1\to 10^{k-1}\le n<10^{k-1}\sqrt{10}$,

*$d:=2k\to 10^{k-1}\sqrt{10}\le n<10^k$,
and you can "read" all the requested counts from the expansions 


*

*$\sqrt{10}-1\to21622776601683793319988935444327\cdots$

*$10-\sqrt{10}\to68377223398316206680011064555673\cdots$
taking $d/2$ digits from the left, alternatively and adding one for odd $d$.
For increasing $d$,
$$3,6,22,68,217,683,2163,6837,\cdots.$$
(The first count is $3$ because $0$ is considered a zero-digits number.)
