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