A020990 a(n) = Sum_{k=0..n} (-1)^k*A020985(k).
1, 0, 1, 2, 3, 2, 1, 0, 1, 0, 1, 2, 1, 2, 3, 4, 5, 4, 5, 6, 7, 6, 5, 4, 3, 4, 3, 2, 3, 2, 1, 0, 1, 0, 1, 2, 3, 2, 1, 0, 1, 0, 1, 2, 1, 2, 3, 4, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 5, 6, 5, 6, 7, 8, 9, 8, 9, 10, 11, 10, 9, 8, 9, 8, 9, 10, 9, 10, 11
Offset: 0
Keywords
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.
- Index entries for sequences related to coordinates of 2D curves
Programs
-
Haskell
a020990 n = a020990_list !! n a020990_list = scanl1 (+) $ zipWith (*) a033999_list a020985_list -- Reinhard Zumkeller, Jun 06 2012
-
Mathematica
Accumulate[Table[(-1)^n*RudinShapiro[n], {n, 0, 100}]] (* Paolo Xausa, Oct 18 2024 *)
-
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
Formula
Brillhart and Morton (1978) list many properties.
Extensions
Edited by N. J. A. Sloane, Jun 06 2012