Does the set of squares $S = \{n^2: n\in\omega\}$ adhere to [Benford's law](https://en.wikipedia.org/wiki/Benford%27s_law) for the first digit in every base $b\geq 2$?


**Precise formulation of what it means for a set $T\subseteq \omega$ to "adhere to Benford's law".** Let $b \geq 2$ be an integer. For $x\in\omega$, let $f^1\_b(x)$ be the first digit of $x$ in $b$-ary representation. We say that a set $T\subseteq \omega$ *adheres to Benford's law in base $b$* if for every $d\in\{0,\ldots , b-1\} = b$ we have $$\lim \sup\_{n\to\infty} \frac{|\{t\in (T\cap n): f^1\_b(t) = d\}|}{|T\cap n| + 1} \; = \; \log\_b\Big(1 + \frac{1}{d}\Big).$$



Does the set of square numbers adhere to Benford's law in every base?
No. Benford's law works well for sequences that grow exponentially, and the squares grow too slowly.


In particular, fix a base $b \geq 3$, consider the case of $d = 1$, and choose $n = 2 \cdot b^{2k}$. For this $n$, we have
$$
 |\{ t \in (S \cap n) : f\_{b}^{1}(t) = 1 \}| = \sum\_{r=1}^{2k} \lfloor b^{r/2} \sqrt{2} \rfloor - \lfloor b^{r/2} \rfloor + 1,
$$
while the size of $|T \cap n| + 1 = \lfloor b^{k} \sqrt{2} \rfloor + 1$.


This leads to a value for the ratio which tends to
$$
 \frac{(\sqrt{2} - 1) \left(1 + \frac{1}{\sqrt{b}} + \frac{1}{b} + \cdots\right)}{\sqrt{2}} = \frac{\frac{\sqrt{2} - 1}{\sqrt{2}}}{\frac{\sqrt{b} - 1}{\sqrt{b}}}
$$
as $k \to \infty$. We have that
$$ \frac{\frac{\sqrt{2} - 1}{\sqrt{2}}}{\frac{\sqrt{b} - 1}{\sqrt{b}}} > \log\_{b}(2) $$
for all $b \geq 3$.


