A086009 Number of 1's in decimal expansion of n^2.
0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 2, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 0, 2, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 2, 1, 1, 2
Offset: 0
Examples
4^2 = 16, so a(4)=1 and 11^2 = 121, so a(11)=2.
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
Crossrefs
Programs
-
Mathematica
DigitCount[(Range[0, 100])^2, 10, 1] (* G. C. Greubel, Dec 13 2016 *)
-
PARI
A086009(n)=#select(d->d==1,digits(n^2)) \\ M. F. Hasler, Feb 21 2016