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.

A377415 a(n) = n - A377414(n).

This page as a plain text file.
%I A377415 #10 Oct 31 2024 01:28:49
%S A377415 0,0,0,1,0,0,2,2,0,1,0,1,4,5,4,5,0,0,2,2,0,0,2,2,8,8,10,10,8,8,10,10,
%T A377415 0,1,0,1,4,5,4,5,0,1,0,1,4,5,4,5,16,17,16,17,20,21,20,21,16,17,16,17,
%U A377415 20,21,20,21,0,0,2,2,0,0,2,2,8,8,10,10,8,8,10
%N A377415 a(n) = n - A377414(n).
%C A377415 For any n > 0 with binary expansion (b_1 = 1, b_2, ..., b_k), the binary expansion of a(n) is (c_1, ..., c_k) where c_i = b_i when i is even, c_i = 0 when i is odd.
%H A377415 Rémy Sigrist, <a href="/A377415/b377415.txt">Table of n, a(n) for n = 0..8191</a>
%H A377415 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A377415 a(n) = 0 iff n belongs to A126684.
%F A377415 a(a(n)) = 0.
%F A377415 a(2*n) = 2*a(n).
%e A377415 The first terms, in decimal and in binary, are:
%e A377415   n   a(n)  bin(n)  bin(a(n))
%e A377415   --  ----  ------  ---------
%e A377415    0     0       0          0
%e A377415    1     0       1          0
%e A377415    2     0      10          0
%e A377415    3     1      11          1
%e A377415    4     0     100          0
%e A377415    5     0     101          0
%e A377415    6     2     110         10
%e A377415    7     2     111         10
%e A377415    8     0    1000          0
%e A377415    9     1    1001          1
%e A377415   10     0    1010          0
%e A377415   11     1    1011          1
%e A377415   12     4    1100        100
%e A377415   13     5    1101        101
%e A377415   14     4    1110        100
%e A377415   15     5    1111        101
%o A377415 (PARI) a(n) = { my (v = 0, x = exponent(n), y); while (n, n -= 2^y = exponent(n); if (x%2 != y%2, v += 2^y;);); return (v); }
%Y A377415 See A063694, A063695 and A374355 for similar sequences.
%Y A377415 Cf. A126684, A371459, A377414.
%K A377415 nonn,base,easy
%O A377415 0,7
%A A377415 _Rémy Sigrist_, Oct 27 2024