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.

A253608 The binary representation of a(n) is the concatenation of n and the binary complement of n, A035327(n).

This page as a plain text file.
%I A253608 #19 May 05 2021 13:40:27
%S A253608 2,9,12,35,42,49,56,135,150,165,180,195,210,225,240,527,558,589,620,
%T A253608 651,682,713,744,775,806,837,868,899,930,961,992,2079,2142,2205,2268,
%U A253608 2331,2394,2457,2520,2583,2646,2709,2772,2835,2898,2961,3024,3087,3150,3213
%N A253608 The binary representation of a(n) is the concatenation of n and the binary complement of n, A035327(n).
%H A253608 Michael De Vlieger, <a href="/A253608/b253608.txt">Table of n, a(n) for n = 1..10000</a>
%F A253608 a(n) = (n+1) * (2^BL(n) - 1), where BL(n) is the binary length of n.
%p A253608 a:= n-> (n+1)*(2^(ilog2(n)+1)-1):
%p A253608 seq(a(n), n=1..50);  # _Alois P. Heinz_, Jan 08 2015
%t A253608 Array[(# + 1) (2^(Floor@ Log2[#] + 1) - 1) &, 50] (* _Michael De Vlieger_, Oct 13 2018 *)
%o A253608 (Python)
%o A253608 for n in range(1,333):
%o A253608   print(str((n+1)*(2 ** int.bit_length(int(n))-1)), end=',')
%o A253608 (PARI) a(n) = (n+1)*(2^#binary(n)-1); \\ _Michel Marcus_, Jan 08 2015
%Y A253608 Cf. A035327, A036044, A070939.
%K A253608 nonn,easy,base
%O A253608 1,1
%A A253608 _Alex Ratushnyak_, Jan 05 2015