

A163808


Write n in binary. Place a 0 right of every 1 without a 0 right of it. a(n) = the decimal value of the result.


2



2, 2, 10, 4, 10, 10, 42, 8, 18, 10, 42, 20, 42, 42, 170, 16, 34, 18, 74, 20, 42, 42, 170, 40, 82, 42, 170, 84, 170, 170, 682, 32, 66, 34, 138, 36, 74, 74, 298, 40, 82, 42, 170, 84, 170, 170, 682, 80, 162, 82, 330, 84, 170, 170, 682, 168, 338, 170, 682, 340, 682, 682, 2730
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

All terms are even.


LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000


EXAMPLE

13 in binary is 1101. The first and last 1 each do not have a 0 right of them. So place a 0 after the first 1 and after the last 1 so as to get 101010. a(13) is the decimal equivalent of 101010, which is 42.


MATHEMATICA

f[n_Integer]:=Module[{l=IntegerDigits[n, 2]//.{a___, 1, 1, b___}>{a, 1, 0, 1, b}}, If[Last[l]==1, l=Append[l, 0], l]; FromDigits[l, 2]]; Table[f[i], {i, 60}] [From Harvey P. Dale, Aug 13 2009]


CROSSREFS

Cf. A163809
Sequence in context: A308693 A163937 A083457 * A223126 A127058 A242002
Adjacent sequences: A163805 A163806 A163807 * A163809 A163810 A163811


KEYWORD

base,nonn


AUTHOR

Leroy Quet, Aug 04 2009


EXTENSIONS

Additional terms provided. Harvey P. Dale, Aug 12 2009
More terms from Sean A. Irvine, Nov 05 2009


STATUS

approved



