A022155 Values of n at which Golay-Rudin-Shapiro sequence A020985 is negative.
3, 6, 11, 12, 13, 15, 19, 22, 24, 25, 26, 30, 35, 38, 43, 44, 45, 47, 48, 49, 50, 52, 53, 55, 59, 60, 61, 63, 67, 70, 75, 76, 77, 79, 83, 86, 88, 89, 90, 94, 96, 97, 98, 100, 101, 103, 104, 105, 106, 110, 115, 118, 120, 121, 122, 126, 131, 134, 139, 140
Offset: 1
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- J. Brillhart and P. Morton, A case study in mathematical research: the Golay-Rudin-Shapiro sequence, Amer. Math. Monthly, 103 (1996) 854-869.
- Vladimir Shevelev, Two analogs of Thue-Morse sequence, arXiv:1603.04434 [math.NT], 2016.
Programs
-
Haskell
import Data.List (elemIndices) a022155 n = a022155_list !! (n-1) a022155_list = elemIndices (- 1) a020985_list -- Reinhard Zumkeller, Jan 02 2012
-
Mathematica
Position[Array[RudinShapiro, 200, 0], ?Negative] - 1 // Flatten (* _Jean-François Alcover, Dec 04 2018 *)
-
Python
from itertools import count, islice def A022155_gen(startvalue=0): # generator of terms >= startvalue return filter(lambda n:(n&(n>>1)).bit_count()&1,count(max(startvalue,0))) A022155_list = list(islice(A022155_gen(),30)) # Chai Wah Wu, Feb 11 2023
Comments