A376295 The binary expansion of a(n) is the reversal of the concatenation of the binary expansions of 1,...,n.
1, 3, 27, 59, 1339, 7483, 122171, 253243, 19127611, 186899771, 7166221627, 32936025403, 1544764513595, 16937927302459, 544703508634939, 1107653462056251, 307352428123249979, 5495499198854061371, 466664101041592851771, 3418143152835121110331, 400096927713885319060795
Offset: 1
Examples
For n = 4 a(4) = 59 because: Concatenation: 1 10 11 100 Reversed order: 00111011 And 00111011 in base 10 is 59.
Links
- Paolo Xausa, Table of n, a(n) for n = 1..400
Programs
-
Mathematica
IntegerReverse[Module[{n = 1}, NestList[#*2^BitLength[++n] + n &, 1, 25]], 2] (* Paolo Xausa, Sep 30 2024 *)
-
Python
a = lambda n: int("".join(bin(x)[2:] for x in range(1,n+1))[::-1],2) print([a(n) for n in range(1,22)])