A168046 Characteristic function of zerofree numbers in decimal representation.
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0
Offset: 0
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
- Eric Weisstein's World of Mathematics, Zerofree
- Index entries for characteristic functions
Programs
-
Haskell
a168046 = fromEnum . ch0 where ch0 x = x > 0 && (x < 10 || d > 0 && ch0 x') where (x', d) = divMod x 10 -- Reinhard Zumkeller, May 10 2015, Apr 07 2011
-
Mathematica
Map[Boole[FreeQ[IntegerDigits[#], 0]] &, Range[0, 100]] (* Paolo Xausa, May 06 2024 *)
Formula
From Hieronymus Fischer, Jan 23 2013: (Start)
where dp_10(n) digital product of n in base 10.
a(n) = 1 - A217096(n).
a(n) = 1 - sign(A055641(n)).
g(x) = x(1-x^9)/((1-x)(1-x^10))(1 + sum_{j>=1} (x^((10^j-10)/9) - x^10^j)/(1-x^10^(j+1)))).
(End)
Comments