login
A136400
Replace all digits greater than 1 with 1 (in decimal representation).
4
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11
OFFSET
0,11
COMMENTS
A054055(a(n)) <= 1; A064770(a(n)) = a(n).
LINKS
FORMULA
a(n) = A064770(A064770(n)).
MATHEMATICA
Table[FromDigits[If[#>1, 1, #]&/@IntegerDigits[n]], {n, 0, 120}] (* Harvey P. Dale, Jul 24 2016 *)
PROG
(PARI) a(n)=subst(Pol(apply(k->min(k, 1), digits(n))), 'x, 10) \\ Charles R Greathouse IV, Jul 31 2013
(Haskell)
a136400 0 = 0
a136400 n = a136400 n' * 10 + min 1 d where (n', d) = divMod n 10
-- Reinhard Zumkeller, Aug 05 2013
(Python)
def A136400(n): return int(''.join(str(int(d>='1')) for d in str(n))) # Chai Wah Wu, Oct 29 2024
CROSSREFS
Sequence in context: A004288 A065016 A087381 * A334027 A121266 A045988
KEYWORD
nonn,base,easy
AUTHOR
Reinhard Zumkeller, Dec 30 2007
STATUS
approved