cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A136400 Replace all digits greater than 1 with 1 (in decimal representation).

This page as a plain text file.
%I A136400 #17 Oct 29 2024 12:26:27
%S A136400 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,
%T A136400 11,11,11,11,10,11,11,11,11,11,11,11,11,11,10,11,11,11,11,11,11,11,11,
%U A136400 11,10,11,11,11,11,11,11,11,11,11,10,11,11,11,11,11,11,11,11,11,10,11,11
%N A136400 Replace all digits greater than 1 with 1 (in decimal representation).
%C A136400 A054055(a(n)) <= 1; A064770(a(n)) = a(n).
%H A136400 Reinhard Zumkeller, <a href="/A136400/b136400.txt">Table of n, a(n) for n = 0..9999</a>
%F A136400 a(n) = A064770(A064770(n)).
%t A136400 Table[FromDigits[If[#>1,1,#]&/@IntegerDigits[n]],{n,0,120}] (* _Harvey P. Dale_, Jul 24 2016 *)
%o A136400 (PARI) a(n)=subst(Pol(apply(k->min(k,1), digits(n))),'x,10) \\ _Charles R Greathouse IV_, Jul 31 2013
%o A136400 (Haskell)
%o A136400 a136400 0 = 0
%o A136400 a136400 n = a136400 n' * 10 + min 1 d where (n',d) = divMod n 10
%o A136400 -- _Reinhard Zumkeller_, Aug 05 2013
%o A136400 (Python)
%o A136400 def A136400(n): return int(''.join(str(int(d>='1')) for d in str(n))) # _Chai Wah Wu_, Oct 29 2024
%K A136400 nonn,base,easy
%O A136400 0,11
%A A136400 _Reinhard Zumkeller_, Dec 30 2007