OFFSET
0,4
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
John Brillhart and Patrick Morton, Über Summen von Rudin-Shapiroschen Koeffizienten, (German) Illinois J. Math. 22 (1978), no. 1, 126--148. MR0476686 (57 #16245). - N. J. A. Sloane, Jun 06 2012
J. Brillhart and P. Morton, A case study in mathematical research: the Golay-Rudin-Shapiro sequence, Amer. Math. Monthly, 103 (1996) 854-869.
Narad Rampersad and Jeffrey Shallit, Rudin-Shapiro Sums Via Automata Theory and Logic, arXiv:2302.00405 [math.NT], February 1 2023.
FORMULA
Brillhart and Morton (1978) list many properties.
MATHEMATICA
Accumulate[Table[(-1)^n*RudinShapiro[n], {n, 0, 100}]] (* Paolo Xausa, Oct 18 2024 *)
PROG
(Haskell)
a020990 n = a020990_list !! n
a020990_list = scanl1 (+) $ zipWith (*) a033999_list a020985_list
-- Reinhard Zumkeller, Jun 06 2012
(PARI) a(n) = sum(k=0, n, (-1)^(k+hammingweight(bitand(k, k>>1)))); \\ Michel Marcus, Oct 07 2017
(Python)
def A020990(n): return sum(-1 if ((m&(m>>1)).bit_count()^m)&1 else 1 for m in range(n+1)) # Chai Wah Wu, Feb 11 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited by N. J. A. Sloane, Jun 06 2012
STATUS
approved