A338691 Positions of (-1)'s in A209615.
2, 3, 7, 8, 10, 11, 12, 15, 18, 19, 23, 26, 27, 28, 31, 32, 34, 35, 39, 40, 42, 43, 44, 47, 48, 50, 51, 55, 58, 59, 60, 63, 66, 67, 71, 72, 74, 75, 76, 79, 82, 83, 87, 90, 91, 92, 95, 98, 99, 103, 104, 106, 107, 108, 111, 112, 114, 115, 119, 122, 123, 124, 127, 128
Offset: 1
Examples
15 is a term since it is in the family {(4*m+3) * 2^(2t)} with m = 3, t = 0. 18 is a term since it is in the family {(4*m+1) * 2^(2t+1)} with m = 2, t = 0.
Links
- Jianing Song, Table of n, a(n) for n = 1..8192
- Kevin Ryde, Iterations of the Alternate Paperfolding Curve, see index "TurnRight" with a(n) = TurnRight(n-1).
Crossrefs
Programs
-
Mathematica
A338691Q[k_] := JacobiSymbol[-1, k]*(-1)^IntegerExponent[k, 2] == -1; Select[Range[200], A338691Q] (* Paolo Xausa, Feb 26 2025 *)
-
PARI
isA338691(n) = my(e=valuation(n, 2), k=bittest(n, e+1)); (k+e)%2
-
Python
def A338691(n): 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)) m, k = n, f(n) while m != k: m, k = k, f(k) return m # Chai Wah Wu, Feb 24 2025
Formula
a(n) = A343501(n)/2. - Jianing Song, Apr 26 2021
Comments