|
|
A055641
|
|
Number of zero digits in n.
|
|
67
|
|
|
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,101
|
|
LINKS
|
|
|
FORMULA
|
a(n) = m + 1 - A055640(n) = Sum_{j=1..m+1} (1 + floor(n/10^j) - floor(n/10^j+0.9)), where m = floor(log_10(n)).
G.f.: g(x) = 1 + (1/(1-x))*Sum_{j>=0} (x^(10*10^j) - x^(11*10^j))/(1-x^10^(j+1)). (End)
|
|
EXAMPLE
|
a(99) = 0 because the digits of 99 are 9 and 9, a(100) = 2 because the digits of 100 are 1, 0 and 0 and there are two 0's.
|
|
MATHEMATICA
|
|
|
PROG
|
(Haskell)
a055641 n | n < 10 = 0 ^ n
| otherwise = a055641 n' + 0 ^ d where (n', d) = divMod n 10
(Python)
def a(n): return str(n).count("0")
|
|
CROSSREFS
|
Cf. A011540, A004719, A052382, A054899, A055640, A102669-A102685, A122840, A160093, A160094, A196563, A195564, A000120, A000788, A023416, A059015 (for base 2), A085974.
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|