login
A305989
Numbers in binary reversed.
4
0, 1, 1, 11, 1, 101, 11, 111, 1, 1001, 101, 1101, 11, 1011, 111, 1111, 1, 10001, 1001, 11001, 101, 10101, 1101, 11101, 11, 10011, 1011, 11011, 111, 10111, 1111, 11111, 1, 100001, 10001, 110001, 1001, 101001, 11001, 111001, 101, 100101, 10101, 110101, 1101, 101101, 11101, 111101, 11, 100011, 10011
OFFSET
0,4
LINKS
FORMULA
a(n) = A004086(A007088(n)).
EXAMPLE
11 is 1011 in binary, and reversing it gives 1101 = a(11).
MAPLE
a:= n-> parse(cat(convert(n, base, 2)[])):
seq(a(n), n=0..75); # Alois P. Heinz, Jun 17 2018
MATHEMATICA
Table[FromDigits@ Reverse@ IntegerDigits[n, 2], {n, 0, 50}]
PROG
(PARI) a(n) = fromdigits(Vecrev(digits(n, 2)), 10);
(Python) print(0)
for i in range(1, 50):
print(format(i, 'b')[::-1].strip("0"))
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
David F. Marrs, Jun 16 2018
STATUS
approved