Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #11 Dec 15 2017 17:36:31
%S 0,0,1,0,0,0,0,1,1,0,0,0,2,0,0,0,0,0,1,0,1,2,2,0,0,0,0,0,1,1,0,0,1,0,
%T 0,0,0,0,3,0,0,0,1,1,0,0,0,0,1,1,0,0,1,0,0,0,0,1,1,1,0,0,2,0,1,1,1,2,
%U 2,1,1,1,1,0,1,0,0,0,1,1,1,0,1,0,0,0,0,0,2,0,0,0,2,1,0,0,0,1,1,0,0,0,2,0,0
%N Number of 4's in decimal expansion of n^2.
%H G. C. Greubel, <a href="/A086012/b086012.txt">Table of n, a(n) for n = 0..1000</a>
%t DigitCount[(Range[0, 100])^2, 10, 4] (* _G. C. Greubel_, Dec 13 2016 *)
%o (PARI) A086012(n)=#select(d->d==4,digits(n^2)) \\ _M. F. Hasler_, Feb 21 2016
%Y Cf. 0's A086008, 1's A086009, 2's A086010, 3's A086011, 5's A086013, 6's A086014, 7's A086015, 8's A086016, 9's A086017.
%Y Cf. A269244 for the n^3 analog.
%K base,nonn
%O 0,13
%A _Jason Earls_, Jul 07 2003