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 A338691 #38 Feb 26 2025 11:36:55 %S A338691 2,3,7,8,10,11,12,15,18,19,23,26,27,28,31,32,34,35,39,40,42,43,44,47, %T A338691 48,50,51,55,58,59,60,63,66,67,71,72,74,75,76,79,82,83,87,90,91,92,95, %U A338691 98,99,103,104,106,107,108,111,112,114,115,119,122,123,124,127,128 %N A338691 Positions of (-1)'s in A209615. %C A338691 Also positions of 2's and 3's in A003324. %C A338691 Also positions of 1's in A292077. - _Jianing Song_, Nov 27 2021 %C A338691 Numbers of the form (2*k+1) * 2^e where k+e is odd. In other words, union of {(4*m+1) * 2^(2t+1)} and {(4*m+3) * 2^(2t)}, where m >= 0, t >= 0. %C A338691 Numbers whose quaternary (base-4) expansion ends in 300...00 or 0200..00 or 2200..00. Trailing 0's are not necessary. %C A338691 There are precisely 2^(N-1) terms <= 2^N for every N >= 1. %C A338691 Equals A004767 Union A343500. %C A338691 Complement of A338692. - _Jianing Song_, Apr 26 2021 %H A338691 Jianing Song, <a href="/A338691/b338691.txt">Table of n, a(n) for n = 1..8192</a> %H A338691 Kevin Ryde, <a href="http://user42.tuxfamily.org/alternate/index.html">Iterations of the Alternate Paperfolding Curve</a>, see index "TurnRight" with a(n) = TurnRight(n-1). %F A338691 a(n) = A343501(n)/2. - _Jianing Song_, Apr 26 2021 %e A338691 15 is a term since it is in the family {(4*m+3) * 2^(2t)} with m = 3, t = 0. %e A338691 18 is a term since it is in the family {(4*m+1) * 2^(2t+1)} with m = 2, t = 0. %t A338691 A338691Q[k_] := JacobiSymbol[-1, k]*(-1)^IntegerExponent[k, 2] == -1; %t A338691 Select[Range[200], A338691Q] (* _Paolo Xausa_, Feb 26 2025 *) %o A338691 (PARI) isA338691(n) = my(e=valuation(n, 2), k=bittest(n, e+1)); (k+e)%2 %o A338691 (Python) %o A338691 def A338691(n): %o A338691 def f(x): return n+x-sum(((x>>i)-1>>2)+1 for i in range(1,x.bit_length(),2))-sum(((x>>i)-3>>2)+1 for i in range(0,x.bit_length(),2)) %o A338691 m, k = n, f(n) %o A338691 while m != k: m, k = k, f(k) %o A338691 return m # _Chai Wah Wu_, Feb 24 2025 %Y A338691 Cf. A209615, A338692 (positions of 1's), A004767 (the odd terms), A343500 (the even terms), A003324, A292077, A343501. %K A338691 nonn,easy %O A338691 1,1 %A A338691 _Jianing Song_, Apr 24 2021