OFFSET
1,2
FORMULA
a(n) = binary_to_decimal(concatenate(binary(n), binary(n-1), binary(n-2), ..., 11, 10, 1, 10, 11, ..., binary(n-2), binary(n-1), binary(n)))
EXAMPLE
a(1) = binary_to_decimal(1) = 1;
a(2) = binary_to_decimal(10110) = 22;
a(3) = binary_to_decimal(111011011) = 475;
a(4) = binary_to_decimal(100111011011100) = 20188.
MATHEMATICA
Table[d = IntegerDigits[#, 2] & /@ Range@ n; FromDigits[#, 2] &@
Flatten[{Flatten@ Reverse@ d, Flatten@ Rest@ d}, 1], {n, 16}] (* Michael De Vlieger, Aug 20 2015 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Umut Uludag, Aug 10 2015
EXTENSIONS
a(11)-a(16) from Michael De Vlieger, Aug 20 2015
STATUS
approved