A338692 Positions of 1's in A209615.
1, 4, 5, 6, 9, 13, 14, 16, 17, 20, 21, 22, 24, 25, 29, 30, 33, 36, 37, 38, 41, 45, 46, 49, 52, 53, 54, 56, 57, 61, 62, 64, 65, 68, 69, 70, 73, 77, 78, 80, 81, 84, 85, 86, 88, 89, 93, 94, 96, 97, 100, 101, 102, 105, 109, 110, 113, 116, 117, 118, 120, 121, 125, 126
Offset: 1
Examples
14 is a term since it is in the family {(4*m+3) * 2^(2t+1)} with m = 1, t = 0. 16 is a term since it is in the family {(4*m+1) * 2^(2t)} with m = 0, t = 2.
Links
- Jianing Song, Table of n, a(n) for n = 1..8192
- Kevin Ryde, Iterations of the Alternate Paperfolding Curve, see index "TurnLeft" with a(n) = TurnLeft(n-1).
Crossrefs
Programs
-
Mathematica
A338692Q[k_] := JacobiSymbol[-1, k]*(-1)^IntegerExponent[k, 2] == 1; Select[Range[200], A338692Q] (* Paolo Xausa, Feb 26 2025 *)
-
PARI
isA338692(n) = my(e=valuation(n, 2), k=bittest(n, e+1)); !((k+e)%2)
-
Python
def A338692(n): 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)) m, k = n, f(n) while m != k: m, k = k, f(k) return m # Chai Wah Wu, Feb 27 2025
Formula
a(n) = A343500(n)/2. - Jianing Song, Apr 26 2021
Comments