A203463 Where Golay-Rudin-Shapiro sequence A020985 is positive.
0, 1, 2, 4, 5, 7, 8, 9, 10, 14, 16, 17, 18, 20, 21, 23, 27, 28, 29, 31, 32, 33, 34, 36, 37, 39, 40, 41, 42, 46, 51, 54, 56, 57, 58, 62, 64, 65, 66, 68, 69, 71, 72, 73, 74, 78, 80, 81, 82, 84, 85, 87, 91, 92, 93, 95, 99, 102, 107, 108, 109, 111, 112, 113, 114
Offset: 1
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Vladimir Shevelev, Two analogs of Thue-Morse sequence, arXiv:1603.04434 [math.NT], 2016.
Programs
-
Haskell
import Data.List (elemIndices) a203463 n = a203463_list !! (n-1) a203463_list = elemIndices 1 a020985_list
-
Mathematica
GRS = Table[RudinShapiro[n], {n, 0, 200}]; Position[GRS, ?Positive] - 1 // Flatten (* _Jean-François Alcover, Dec 11 2018 *)
-
Python
from itertools import count, islice def A203463_gen(startvalue=0): # generator of terms >= startvalue return filter(lambda n:(n&(n>>1)).bit_count()&1^1,count(max(startvalue,0))) A203463_list = list(islice(A203463_gen(),30)) # Chai Wah Wu, Feb 11 2023
Comments