The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A103181 In decimal representation of n: replace all even digits with 0 and all odd digits with 1. 4
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 0, 1, 0, 1, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,11
LINKS
FORMULA
n = Sum(d(k)*10^k: 0<=d(k)<10) -> a(n) = Sum((d(k) mod 2)*10^k).
a(A014263(n)) = 0. - Reinhard Zumkeller, Oct 04 2011
EXAMPLE
199->'111': a(199)=111; 200->'000': a(200)=0;
299->'011': a(299)=11; 300->'100': a(300)=100.
MATHEMATICA
Table[FromDigits[If[EvenQ[#], 0, 1]&/@IntegerDigits[n]], {n, 0, 90}] (* Harvey P. Dale, Nov 08 2022 *)
PROG
(Haskell)
import Data.List (unfoldr); import Data.Tuple (swap)
a103181_list = map a103181 [0..]
a103181 n = foldl f 0 $ reverse $ unfoldr g n where
f v d = 10 * v + mod d 2
g x = if x == 0 then Nothing else Just $ swap $ divMod x 10
-- Reinhard Zumkeller, Oct 04 2011
(PARI) a(n)=subst(Pol(apply(k->k%2, digits(n))), 'x, 10) \\ Charles R Greathouse IV, Jul 16 2013
(Python)
def A103181(n): return int(''.join(str(int(d) % 2) for d in str(n))) # Chai Wah Wu, Apr 09 2022
CROSSREFS
Sequence in context: A352390 A004499 A020509 * A100813 A085209 A085217
KEYWORD
nonn,base,easy
AUTHOR
Reinhard Zumkeller, Mar 18 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 27 11:17 EDT 2024. Contains 372858 sequences. (Running on oeis4.)