A305930 Number of digits '0' in 3^n (in base 10).
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 3, 2, 0, 0, 1, 0, 0, 0, 1, 2, 0, 2, 2, 0, 4, 2, 3, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 3, 1, 2, 1, 2, 7, 6, 2, 5, 2, 4, 2, 2, 2, 1, 2, 4, 4, 3, 0, 2, 4, 2, 1, 1, 4, 3, 5, 4, 5, 4, 5, 3, 3, 2, 6, 6, 5, 3, 4, 5, 3, 5, 5, 2, 6, 6, 2, 6, 4, 7
Offset: 0
Examples
3^10 = 59049 is the smallest power of 3 having a digit 0, so a(10) = 1 is the first nonzero term.
Crossrefs
Programs
-
Haskell
a305930 = a055641 . a000244
-
Mathematica
Table[ Count[ IntegerDigits[3^n], 0], {n, 0, 100} ] DigitCount[3^Range[0,110],10,0]
-
PARI
apply( A305930(n)=#select(d->!d,digits(3^n)), [0..99])