A269241 Number of times the digit 1 appears in the decimal expansion of n^3.
0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 2, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 2, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 2, 0, 1, 2, 2, 1, 2, 1, 1, 1, 1, 2, 2, 3, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2, 0, 1, 0, 1, 0, 0, 0, 0, 1, 2, 1, 1, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0
Offset: 0
Examples
0^3 = 0 has a(0) = 0 digits '1'. 1^3 = 1 has a(1) = 1 digit '1'. 2^3 = 8 has a(2) = 0 digits '1'. 3^3 = 27 has a(3) = 0 digits '1'. 4^3 = 64 has a(4) = 0 digits '1'. 5^3 = 125 has a(5) = 1 digit '1'. 11^3 = 1331 is the smallest cube to have a(11) = 2 digits '1'.
Crossrefs
Programs
-
Mathematica
Table[DigitCount[n^3, 10, 1], {n, 0, 99}] (* Alonso del Arte, Feb 20 2016 *)
-
PARI
A269241(n)=#select(t->t==1,digits(n^3))
Comments