login
a(n) = Sum_{k=0..n} (-1)^k*A020985(k).
5

%I #40 Oct 18 2024 06:18:47

%S 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,

%T 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,

%U 11,10,9,8,9,8,9,10,9,10,11

%N a(n) = Sum_{k=0..n} (-1)^k*A020985(k).

%H Reinhard Zumkeller, <a href="/A020990/b020990.txt">Table of n, a(n) for n = 0..10000</a>

%H John Brillhart and Patrick Morton, <a href="http://projecteuclid.org/euclid.ijm/1256048841">Über Summen von Rudin-Shapiroschen Koeffizienten</a>, (German) Illinois J. Math. 22 (1978), no. 1, 126--148. MR0476686 (57 #16245). - _N. J. A. Sloane_, Jun 06 2012

%H J. Brillhart and P. Morton, <a href="http://www.maa.org/programs/maa-awards/writing-awards/a-case-study-in-mathematical-research-the-golay-rudin-shapiro-sequence">A case study in mathematical research: the Golay-Rudin-Shapiro sequence</a>, Amer. Math. Monthly, 103 (1996) 854-869.

%H Narad Rampersad and Jeffrey Shallit, <a href="https://arxiv.org/abs/2302.00405">Rudin-Shapiro Sums Via Automata Theory and Logic</a>, arXiv:2302.00405 [math.NT], February 1 2023.

%H <a href="/index/Con#coordinates_2D_curves">Index entries for sequences related to coordinates of 2D curves</a>

%F Brillhart and Morton (1978) list many properties.

%t Accumulate[Table[(-1)^n*RudinShapiro[n], {n, 0, 100}]] (* _Paolo Xausa_, Oct 18 2024 *)

%o (Haskell)

%o a020990 n = a020990_list !! n

%o a020990_list = scanl1 (+) $ zipWith (*) a033999_list a020985_list

%o -- _Reinhard Zumkeller_, Jun 06 2012

%o (PARI) a(n) = sum(k=0, n, (-1)^(k+hammingweight(bitand(k, k>>1)))); \\ _Michel Marcus_, Oct 07 2017

%o (Python)

%o 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

%Y Cf. A033999, A020986.

%K nonn,changed

%O 0,4

%A _N. J. A. Sloane_

%E Edited by _N. J. A. Sloane_, Jun 06 2012