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 A063695 #30 Feb 27 2025 10:48:16 %S A063695 0,0,2,2,0,0,2,2,8,8,10,10,8,8,10,10,0,0,2,2,0,0,2,2,8,8,10,10,8,8,10, %T A063695 10,32,32,34,34,32,32,34,34,40,40,42,42,40,40,42,42,32,32,34,34,32,32, %U A063695 34,34,40,40,42,42,40,40,42,42,0,0,2,2,0,0,2,2,8,8,10,10,8,8,10,10,0,0 %N A063695 Remove even-positioned bits from the binary expansion of n. %C A063695 In the base 4 expansion of n, change 1 to 0 and 3 to 2. - _Paolo Xausa_, Feb 27 2025 %H A063695 Reinhard Zumkeller, <a href="/A063695/b063695.txt">Table of n, a(n) for n = 0..10000</a> %H A063695 Ralf Stephan, <a href="/somedcgf.html">Some divide-and-conquer sequences ...</a> %H A063695 Ralf Stephan, <a href="/A079944/a079944.ps">Table of generating functions</a> %F A063695 a(n) + A063694(n) = n. %F A063695 a(n) = 2*(floor(n/2)-a(floor(n/2))). - _Vladeta Jovovic_, Feb 23 2003 %F A063695 From _Ralf Stephan_, Oct 06 2003: (Start) %F A063695 G.f. 1/(1-x) * Sum_{k>=0} (-2)^k*2t^2/(1-t^2) where t = x^2^k. %F A063695 Members of A004514 written twice. %F A063695 (End) %F A063695 a(n) = 4 * a(floor(n / 4)) + 2 * floor(n mod 4 / 2). - _Reinhard Zumkeller_, Sep 26 2015 %F A063695 a(n) = A090569(n+1)-1. - _R. J. Mathar_, Jun 22 2020 %F A063695 a(n) = 2*(n - A380110(n)). - _Paolo Xausa_, Feb 27 2025 %e A063695 a(25) = 8 because 25 = 11001 in binary and when we AND this with 1010 we are left with 1000 = 8. %p A063695 [seq(every_other_pos(j,2,1),j=0..120)]; # Function every_other_pos given at A063694. %t A063695 A063695[n_] := FromDigits[ReplaceAll[IntegerDigits[n, 4], {1 -> 0, 3 -> 2}], 4]; %t A063695 Array[A063695, 100, 0] (* _Paolo Xausa_, Feb 27 2025 *) %o A063695 (Haskell) %o A063695 a063695 0 = 0 %o A063695 a063695 n = 4 * a063695 n' + 2 * div q 2 %o A063695 where (n', q) = divMod n 4 %o A063695 -- _Reinhard Zumkeller_, Sep 26 2015 %o A063695 (Python) %o A063695 def A063695(n): return n&((1<<(m:=n.bit_length())+(m&1^1))-1)//3 # _Chai Wah Wu_, Jan 30 2023 %Y A063695 Cf. A004514 (bisection), A063694 (remove odd-positioned bits), A090569. %K A063695 nonn,base,easy %O A063695 0,3 %A A063695 _Antti Karttunen_, Aug 03 2001