login
A165789
a(n) is the smallest positive integer k that when written in binary, and leading 0's of k are ignored, contains the reversal of the digits of binary n.
1
1, 5, 3, 9, 5, 11, 7, 17, 9, 21, 13, 19, 11, 23, 15, 33, 17, 41, 25, 37, 21, 45, 29, 35, 19, 43, 27, 39, 23, 47, 31, 65, 33, 81, 49, 73, 41, 89, 57, 69, 37, 85, 53, 77, 45, 93, 61, 67, 35, 83, 51, 75, 43, 91, 59, 71, 39, 87, 55, 79, 47, 95, 63, 129, 65, 161, 97, 145, 81, 177, 113
OFFSET
1,2
LINKS
FORMULA
a(2n-1) = A030101(2n-1), for all n >=1.
a(2n) = A030101(2n) + 2^(floor(log(n)/log(2))+2), for all n>=1.
PROG
(PARI) a(n) = { my (b=Vecrev(binary(n))); if (b[1]==0, b=concat(1, b)); fromdigits(b, 2) } \\ Rémy Sigrist, Jul 01 2021
CROSSREFS
Cf. A030101.
Sequence in context: A155496 A128426 A336057 * A133090 A145800 A161501
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Sep 26 2009
EXTENSIONS
More terms from Sean A. Irvine, Dec 08 2009
STATUS
approved