OFFSET
1,1
COMMENTS
A020985(a(n)) = -1.
Or numbers n for which numbers of 1's and runs of 1's in binary representation have distinct parities: A010060(n) = 1 - A268411(n). - Vladimir Shevelev, Feb 10 2016
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.
MATHEMATICA
Position[Array[RudinShapiro, 200, 0], _?Negative] - 1 // Flatten (* Jean-François Alcover, Dec 04 2018 *)
PROG
(Haskell)
import Data.List (elemIndices)
a022155 n = a022155_list !! (n-1)
a022155_list = elemIndices (- 1) a020985_list
-- Reinhard Zumkeller, Jan 02 2012
(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)))
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved