A269250 Number of times the digit 0 appears in the decimal expansion of n^3.
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 1, 1, 0, 0, 0, 1, 1, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 2, 0, 0, 0, 2, 0, 1, 3, 0, 0, 1, 1, 0, 0, 0, 0, 1, 3, 0, 0, 0, 1, 0, 1, 1, 0, 1, 3, 0, 0, 1, 1, 0, 0, 0, 0, 1, 6
Offset: 0
Examples
1^3 = 1, 2^3 = 8, 3^3 = 27, 4^3 = 64, ..., 9^3 = 729 all have a(1) = a(2) = ... = a(9) = 0 digits '0'. 0^3 = 0 has a(0) = 1 digit '0'. 10^3 = 1000 has a(10) = 3 digits '0'.
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
Crossrefs
Programs
-
Maple
seq(numboccur(0, convert(n^3,base,10)), n=0..100); # Robert Israel, Feb 21 2016
-
Mathematica
Table[DigitCount[n^3, 10, 0], {n, 0, 100}] (* Robert Price, Mar 21 2020 *)
-
PARI
A269250(n)=!n+#select(t->!t,digits(n^3))
Comments