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 A344346 #23 Jan 29 2025 20:41:48 %S A344346 3,4,11,12,15,16,19,20,27,28,35,36,43,44,47,48,51,52,59,60,63,64,67, %T A344346 68,75,76,79,80,83,84,91,92,99,100,107,108,111,112,115,116,123,124, %U A344346 131,132,139,140,143,144,147,148,155,156,163,164,171,172,175,176,179,180 %N A344346 Numbers k which have an odd number of trailing zeros in their binary reflected Gray code A014550(k). %C A344346 Numbers k such that A050605(k-1) is odd. %C A344346 Numbers k such that A136480(k) is even. %C A344346 The asymptotic density of this sequence is 1/3. %H A344346 Amiram Eldar, <a href="/A344346/b344346.txt">Table of n, a(n) for n = 1..10000</a> %H A344346 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/GrayCode.html">Gray Code</a>. %H A344346 Wikipedia, <a href="https://en.wikipedia.org/wiki/Gray_code">Gray code</a>. %H A344346 <a href="/index/Ar#2-automatic">Index entries for 2-automatic sequences</a>. %F A344346 a(n) = A081706(n) + 1. - _Hugo Pfoertner_, May 16 2021 %e A344346 3 is a term since its Gray code, 10, has 1 trailing zero, and 1 is odd. %e A344346 15 is a term since its Gray code, 1000, has 3 trailing zeros, and 3 is odd. %t A344346 Select[Range[180], OddQ @ IntegerExponent[# * (# + 1)/2, 2] &] %o A344346 (Python) %o A344346 def A344346(n): %o A344346 def f(x): %o A344346 c, s = (n+1>>1)+x, bin(x)[2:] %o A344346 l = len(s) %o A344346 for i in range(l&1^1,l,2): %o A344346 c -= int(s[i])+int('0'+s[:i],2) %o A344346 return c %o A344346 m, k = n, f(n) %o A344346 while m != k: m, k = k, f(k) %o A344346 return (m<<2)-(n&1) # _Chai Wah Wu_, Jan 29 2025 %Y A344346 Cf. A014550, A050605, A081706, A136480. %Y A344346 Similar sequences: A001950 (Zeckendorf), A036554 (binary), A145204 (ternary), A217319 (quaternary), A232745 (factorial), A342050 (primorial). %K A344346 nonn,base,easy %O A344346 1,1 %A A344346 _Amiram Eldar_, May 15 2021