login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065031 In the decimal expansion of n, replace each odd digit by 1 and each even digit by 2. 5
2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

A196563(a(n)) = A196563(n); A196564(a(n)) = A196564(n).

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

EXAMPLE

a(123)=121 because 1 and 3 are odd and 2 is even.

MATHEMATICA

Table[FromDigits[If[OddQ[#], 1, 2]&/@IntegerDigits[n]], {n, 0, 120}] (* Harvey P. Dale, Jun 08 2014 *)

PROG

(Haskell)

a065031 n = f n  where

   f x | x < 10    = 2 - x `mod` 2

       | otherwise = 10 * (f x') + 2 - m `mod` 2

       where (x', m) = divMod x 10

-- Reinhard Zumkeller, Feb 22 2012

CROSSREFS

Sequence in context: A161301 A161276 A160980 * A058061 A064547 A214715

Adjacent sequences:  A065028 A065029 A065030 * A065032 A065033 A065034

KEYWORD

base,nonn

AUTHOR

Santi Spadaro, Nov 03 2001

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified November 24 16:46 EST 2014. Contains 249899 sequences.