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.

A371459 For any positive integer with binary digits (b_1, ..., b_w) (where b_1 = 1), the binary digits of a(n), possibly with leading zeros, are (b_2, b_4, ..., b_{floor(w/2) * 2}); a(0) = 0.

This page as a plain text file.
%I A371459 #23 Mar 28 2024 18:04:05
%S A371459 0,0,0,1,0,0,1,1,0,1,0,1,2,3,2,3,0,0,1,1,0,0,1,1,2,2,3,3,2,2,3,3,0,1,
%T A371459 0,1,2,3,2,3,0,1,0,1,2,3,2,3,4,5,4,5,6,7,6,7,4,5,4,5,6,7,6,7,0,0,1,1,
%U A371459 0,0,1,1,2,2,3,3,2,2,3,3,0,0,1,1,0,0,1
%N A371459 For any positive integer with binary digits (b_1, ..., b_w) (where b_1 = 1), the binary digits of a(n), possibly with leading zeros, are (b_2, b_4, ..., b_{floor(w/2) * 2}); a(0) = 0.
%C A371459 In other words, we keep even-indexed bits.
%C A371459 Every integer appears infinitely many times in the sequence.
%H A371459 Rémy Sigrist, <a href="/A371459/b371459.txt">Table of n, a(n) for n = 0..8192</a>
%H A371459 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A371459 a(n) = 0 iff n belongs to A126684.
%F A371459 a(A000695(n)) = 0.
%F A371459 a(A001196(n)) = n.
%e A371459 The first terms, in decimal and in binary, are:
%e A371459   n   a(n)  bin(n)  bin(a(n))
%e A371459   --  ----  ------  ---------
%e A371459    0     0       0          0
%e A371459    1     0       1          0
%e A371459    2     0      10          0
%e A371459    3     1      11          1
%e A371459    4     0     100          0
%e A371459    5     0     101          0
%e A371459    6     1     110          1
%e A371459    7     1     111          1
%e A371459    8     0    1000          0
%e A371459    9     1    1001          1
%e A371459   10     0    1010          0
%e A371459   11     1    1011          1
%e A371459   12     2    1100         10
%e A371459   13     3    1101         11
%e A371459   14     2    1110         10
%e A371459   15     3    1111         11
%e A371459   16     0   10000          0
%t A371459 A371459[n_] := FromDigits[IntegerDigits[n, 2][[2;;-1;;2]], 2];
%t A371459 Array[A371459, 100, 0] (* _Paolo Xausa_, Mar 28 2024 *)
%o A371459 (PARI) a(n) = { my (b = binary(n)); fromdigits(vector(#b\2, k, b[2*k]), 2); }
%o A371459 (Python)
%o A371459 def A371459(n): return int(bin(n)[3::2],2) if n>1 else 0 # _Chai Wah Wu_, Mar 27 2024
%Y A371459 See A371442 for the sequence related to odd-indexed bits.
%Y A371459 See A059906 and A063695 for similar sequences.
%Y A371459 Cf. A000695, A001196, A126684.
%K A371459 nonn,base,easy
%O A371459 0,13
%A A371459 _Rémy Sigrist_, Mar 24 2024