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.

This page as a plain text file.
%I A376295 #33 Sep 30 2024 12:53:29
%S A376295 1,3,27,59,1339,7483,122171,253243,19127611,186899771,7166221627,
%T A376295 32936025403,1544764513595,16937927302459,544703508634939,
%U A376295 1107653462056251,307352428123249979,5495499198854061371,466664101041592851771,3418143152835121110331,400096927713885319060795
%N A376295 The binary expansion of a(n) is the reversal of the concatenation of the binary expansions of 1,...,n.
%H A376295 Paolo Xausa, <a href="/A376295/b376295.txt">Table of n, a(n) for n = 1..400</a>
%F A376295 a(n) = A030101(A047778(n)).
%e A376295 For n = 4 a(4) = 59 because:
%e A376295 Concatenation:  1 10 11 100
%e A376295 Reversed order: 00111011
%e A376295 And 00111011 in base 10 is 59.
%t A376295 IntegerReverse[Module[{n = 1}, NestList[#*2^BitLength[++n] + n &, 1, 25]], 2] (* _Paolo Xausa_, Sep 30 2024 *)
%o A376295 (Python)
%o A376295 a = lambda n: int("".join(bin(x)[2:] for x in range(1,n+1))[::-1],2)
%o A376295 print([a(n) for n in range(1,22)])
%Y A376295 Cf. A030101, A047778.
%K A376295 nonn,base,easy
%O A376295 1,2
%A A376295 _DarĂ­o Clavijo_, Sep 19 2024