cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A376295 The binary expansion of a(n) is the reversal of the concatenation of the binary expansions of 1,...,n.

Original entry on oeis.org

1, 3, 27, 59, 1339, 7483, 122171, 253243, 19127611, 186899771, 7166221627, 32936025403, 1544764513595, 16937927302459, 544703508634939, 1107653462056251, 307352428123249979, 5495499198854061371, 466664101041592851771, 3418143152835121110331, 400096927713885319060795
Offset: 1

Views

Author

DarĂ­o Clavijo, Sep 19 2024

Keywords

Examples

			For n = 4 a(4) = 59 because:
Concatenation:  1 10 11 100
Reversed order: 00111011
And 00111011 in base 10 is 59.
		

Crossrefs

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)])

Formula

a(n) = A030101(A047778(n)).