cp's OEIS Frontend

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.

A338692 Positions of 1's in A209615.

This page as a plain text file.
%I A338692 #37 Feb 27 2025 15:11:34
%S A338692 1,4,5,6,9,13,14,16,17,20,21,22,24,25,29,30,33,36,37,38,41,45,46,49,
%T A338692 52,53,54,56,57,61,62,64,65,68,69,70,73,77,78,80,81,84,85,86,88,89,93,
%U A338692 94,96,97,100,101,102,105,109,110,113,116,117,118,120,121,125,126
%N A338692 Positions of 1's in A209615.
%C A338692 Also positions of 1's and 4's in A003324.
%C A338692 Also positions of 0's in A292077. - _Jianing Song_, Nov 27 2021
%C A338692 Numbers of the form (2*k+1) * 2^e where k+e is even. In other words, union of {(4*m+1) * 2^(2t)} and {(4*m+3) * 2^(2t+1)}, where m >= 0, t >= 0.
%C A338692 Numbers whose quaternary (base-4) expansion ends in 100...00 or 1200..00 or 3200..00. Trailing 0's are not necessary.
%C A338692 There are precisely 2^(N-1) terms <= 2^N for every N >= 1.
%C A338692 Equals A016813 Union A343501.
%C A338692 Complement of A338691. - _Jianing Song_, Apr 26 2021
%H A338692 Jianing Song, <a href="/A338692/b338692.txt">Table of n, a(n) for n = 1..8192</a>
%H A338692 Kevin Ryde, <a href="http://user42.tuxfamily.org/alternate/index.html">Iterations of the Alternate Paperfolding Curve</a>, see index "TurnLeft" with a(n) = TurnLeft(n-1).
%F A338692 a(n) = A343500(n)/2. - _Jianing Song_, Apr 26 2021
%e A338692 14 is a term since it is in the family {(4*m+3) * 2^(2t+1)} with m = 1, t = 0.
%e A338692 16 is a term since it is in the family {(4*m+1) * 2^(2t)} with m = 0, t = 2.
%t A338692 A338692Q[k_] := JacobiSymbol[-1, k]*(-1)^IntegerExponent[k, 2] == 1;
%t A338692 Select[Range[200], A338692Q] (* _Paolo Xausa_, Feb 26 2025 *)
%o A338692 (PARI) isA338692(n) = my(e=valuation(n, 2), k=bittest(n, e+1)); !((k+e)%2)
%o A338692 (Python)
%o A338692 def A338692(n):
%o A338692     def f(x): return n+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 A338692     m, k = n, f(n)
%o A338692     while m != k: m, k = k, f(k)
%o A338692     return m # _Chai Wah Wu_, Feb 27 2025
%Y A338692 Cf. A209615, A338691 (positions of (-1)'s), A016813 (the odd terms), A343501 (the even terms), A003324, A292077, A343500.
%K A338692 nonn,easy
%O A338692 1,2
%A A338692 _Jianing Song_, Apr 24 2021