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 A342697 #23 Aug 06 2025 17:36:12 %S A342697 0,0,0,1,0,1,3,3,0,0,2,3,6,7,7,7,0,0,0,1,4,5,7,7,12,12,14,15,14,15,15, %T A342697 15,0,0,0,1,0,1,3,3,8,8,10,11,14,15,15,15,24,24,24,25,28,29,31,31,28, %U A342697 28,30,31,30,31,31,31,0,0,0,1,0,1,3,3,0,0,2,3,6 %N A342697 For any number n with binary expansion Sum_{k >= 0} b(k) * 2^k, the binary expansion of a(n) is Sum_{k >= 0} floor((b(k) + b(k+1) + b(k+2))/2) * 2^k. %C A342697 The value of the k-th bit in a(n) corresponds to the most frequent value in the bit triple starting at the k-th bit in n. %H A342697 Rémy Sigrist, <a href="/A342697/b342697.txt">Table of n, a(n) for n = 0..8192</a> %H A342697 Michael De Vlieger, <a href="/A342697/a342697.png">Log log scatterplot of a(n)</a>, n = 0..2^20. %H A342697 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A342697 a(n) = 0 iff n belongs to A048715. %F A342697 a(n) = floor(A048730(n)/8) = floor(A048733(n)/2). - _Kevin Ryde_, Mar 26 2021 %e A342697 The first terms, in decimal and in binary, are: %e A342697 n a(n) bin(n) bin(a(n)) %e A342697 -- ---- ------ --------- %e A342697 0 0 0 0 %e A342697 1 0 1 0 %e A342697 2 0 10 0 %e A342697 3 1 11 1 %e A342697 4 0 100 0 %e A342697 5 1 101 1 %e A342697 6 3 110 11 %e A342697 7 3 111 11 %e A342697 8 0 1000 0 %e A342697 9 0 1001 0 %e A342697 10 2 1010 10 %e A342697 11 3 1011 11 %e A342697 12 6 1100 110 %e A342697 13 7 1101 111 %e A342697 14 7 1110 111 %e A342697 15 7 1111 111 %t A342697 A342697[n_] := Quotient[7*n - BitXor[n, 2*n, 4*n], 8]; %t A342697 Array[A342697, 100, 0] (* _Paolo Xausa_, Aug 06 2025 *) %o A342697 (PARI) a(n) = sum(k=0, #binary(n), ((bittest(n, k)+bittest(n, k+1)+bittest(n, k+2))>=2) * 2^k) %Y A342697 Cf. A048715, A048730, A048733, A342698, A342700. %K A342697 nonn,base,easy,look %O A342697 0,7 %A A342697 _Rémy Sigrist_, Mar 18 2021