A269248 Number of times the digit 8 appears in the decimal expansion of n^3.
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 3, 1, 2, 1, 2, 0, 0, 0, 0
Offset: 0
Examples
0^3 = 0, 1^3 = 1, 3^3 = 27 and 4^3 = 64 all have a(0) = a(1) = a(3) = a(4) = 0 digits '8'. 2^3 = 8 has a(2) = 1 digit '8'.
Crossrefs
Programs
-
Mathematica
Table[DigitCount[n^3, 10, 8], {n, 0, 100}] (* Robert Price, Mar 21 2020 *)
-
PARI
A269248(n)=#select(t->t==8,digits(n^3))
Comments