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.
%I A377404 #12 Oct 31 2024 01:28:24 %S A377404 0,0,0,1,0,1,2,2,0,1,2,2,4,4,4,5,0,1,2,2,4,4,4,5,8,8,8,9,8,9,10,10,0, %T A377404 1,2,2,4,4,4,5,8,8,8,9,8,9,10,10,16,16,16,17,16,17,18,18,16,17,18,18, %U A377404 20,20,20,21,0,1,2,2,4,4,4,5,8,8,8,9,8,9,10,10 %N A377404 In the binary expansion of n, replace the first, third, fifth, etc. 1's by 0's. %C A377404 Each 1 in the binary expansion of n appears either in a(n) or in A265263(n). %H A377404 Rémy Sigrist, <a href="/A377404/b377404.txt">Table of n, a(n) for n = 0..8192</a> %H A377404 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A377404 a(n) = n - A265263(n). %F A377404 a(2*n) = 2*a(n). %F A377404 A000120(a(n)) = floor(A000120(n)/2). %e A377404 The first terms, in decimal and in binary, are: %e A377404 n a(n) bin(n) bin(a(n)) %e A377404 -- ---- ------ --------- %e A377404 0 0 0 0 %e A377404 1 0 1 0 %e A377404 2 0 10 0 %e A377404 3 1 11 1 %e A377404 4 0 100 0 %e A377404 5 1 101 1 %e A377404 6 2 110 10 %e A377404 7 2 111 10 %e A377404 8 0 1000 0 %e A377404 9 1 1001 1 %e A377404 10 2 1010 10 %e A377404 11 2 1011 10 %e A377404 12 4 1100 100 %e A377404 13 4 1101 100 %e A377404 14 4 1110 100 %e A377404 15 5 1111 101 %o A377404 (PARI) a(n) = { my (b = binary(n), h = 0); for (i = 1, #b, if (b[i] && h++%2==1, b[i] %o A377404 = 0;);); fromdigits(b, 2); } %Y A377404 Cf. A000120, A265263. %K A377404 nonn,base,easy %O A377404 0,7 %A A377404 _Rémy Sigrist_, Oct 28 2024