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}] (* Harvey P. Dale, Aug 13 2009 *)
CROSSREFS
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