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!)
A257831 In decimal representation of n: replace each digit with its binary representation. 3

%I #11 Jun 06 2020 16:53:00

%S 0,1,10,11,100,101,110,111,1000,1001,10,11,110,111,1100,1101,1110,

%T 1111,11000,11001,100,101,1010,1011,10100,10101,10110,10111,101000,

%U 101001,110,111,1110,1111,11100,11101,11110,11111,111000,111001,1000,1001,10010,10011

%N In decimal representation of n: replace each digit with its binary representation.

%C a(n) = n iff (largest digit of n) = 1: a(A007088(n)) = A007088(n);

%C a(n) = A007088(A080719(n)).

%H Reinhard Zumkeller, <a href="/A257831/b257831.txt">Table of n, a(n) for n = 0..10000</a>

%e . n | dec --> bin | a(n) | A080719(n)

%e . -----+--------------------------+----------+------------

%e . 100 | [1,0,0] | [1,0,0] | 100 | 4

%e . 101 | [1,0,1] | [1,0,1] | 101 | 5

%e . 102 | [1,0,2] | [1,0,10] | 1010 | 10

%e . 103 | [1,0,3] | [1,0,11] | 1011 | 11

%e . 104 | [1,0,4] | [1,0,100] | 10100 | 20

%e . 105 | [1,0,5] | [1,0,101] | 10101 | 21

%e . 106 | [1,0,6] | [1,0,110] | 10110 | 22

%e . 107 | [1,0,7] | [1,0,111] | 10111 | 23

%e . 108 | [1,0,8] | [1,0,1000] | 101000 | 40

%e . 109 | [1,0,9] | [1,0,1001] | 101001 | 41

%e . 110 | [1,1,0] | [1,1,0] | 110 | 6

%e . 111 | [1,1,1] | [1,1,1] | 111 | 7

%e . 112 | [1,1,2] | [1,1,10] | 1110 | 14

%e . 113 | [1,1,3] | [1,1,11] | 1111 | 15

%e . 114 | [1,1,4] | [1,1,100] | 11100 | 28

%e . 115 | [1,1,5] | [1,1,101] | 11101 | 29

%e . 116 | [1,1,6] | [1,1,110] | 11110 | 30

%e . 117 | [1,1,7] | [1,1,111] | 11111 | 31

%e . 118 | [1,1,8] | [1,1,1000] | 111000 | 56

%e . 119 | [1,1,9] | [1,1,1001] | 111001 | 57

%e . 120 | [1,2,0] | [1,10,0] | 1100 | 12

%e . 121 | [1,2,1] | [1,10,1] | 1101 | 13

%e . 122 | [1,2,2] | [1,10,10] | 11010 | 26

%e . 123 | [1,2,3] | [1,10,11] | 11011 | 27

%e . 124 | [1,2,4] | [1,10,100] | 110100 | 52

%e . 125 | [1,2,5] | [1,10,101] | 110101 | 53 .

%t Table[FromDigits[Flatten[IntegerDigits[#,2]&/@IntegerDigits[n]]],{n,0,50}] (* _Harvey P. Dale_, Jun 06 2020 *)

%o (Haskell)

%o import Data.Maybe (mapMaybe)

%o a257831 = foldr (\b v -> 10 * v + b) 0 .

%o concat . mapMaybe (flip lookup bin) . a031298_row

%o where bin = zip [0..9] a030308_tabf

%o (Python)

%o def A257831(n):

%o ....return int(''.join((format(int(d),'b') for d in str(n))))

%o # _Chai Wah Wu_, May 10 2015

%Y Cf. A007088, A030308, A031298, A080719.

%K nonn,base

%O 0,3

%A _Reinhard Zumkeller_, May 10 2015

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 13 05:21 EDT 2024. Contains 372498 sequences. (Running on oeis4.)