login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A376295
The binary expansion of a(n) is the reversal of the concatenation of the binary expansions of 1,...,n.
1
1, 3, 27, 59, 1339, 7483, 122171, 253243, 19127611, 186899771, 7166221627, 32936025403, 1544764513595, 16937927302459, 544703508634939, 1107653462056251, 307352428123249979, 5495499198854061371, 466664101041592851771, 3418143152835121110331, 400096927713885319060795
OFFSET
1,2
LINKS
FORMULA
a(n) = A030101(A047778(n)).
EXAMPLE
For n = 4 a(4) = 59 because:
Concatenation: 1 10 11 100
Reversed order: 00111011
And 00111011 in base 10 is 59.
MATHEMATICA
IntegerReverse[Module[{n = 1}, NestList[#*2^BitLength[++n] + n &, 1, 25]], 2] (* Paolo Xausa, Sep 30 2024 *)
PROG
(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)])
CROSSREFS
Sequence in context: A201276 A053360 A176963 * A204046 A305094 A120117
KEYWORD
nonn,base,easy
AUTHOR
Darío Clavijo, Sep 19 2024
STATUS
approved