cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A380667 First differences of the Golay-Rudin-Shapiro sequence (A020985), divided by 2.

This page as a plain text file.
%I A380667 #15 Jan 30 2025 15:28:10
%S A380667 0,0,-1,1,0,-1,1,0,0,0,-1,0,0,1,-1,1,0,0,-1,1,0,-1,1,-1,0,0,1,0,0,-1,
%T A380667 1,0,0,0,-1,1,0,-1,1,0,0,0,-1,0,0,1,-1,0,0,0,1,-1,0,1,-1,1,0,0,-1,0,0,
%U A380667 1,-1,1,0,0,-1,1,0,-1,1,0,0,0,-1,0,0,1,-1,1,0,0,-1,1,0
%N A380667 First differences of the Golay-Rudin-Shapiro sequence (A020985), divided by 2.
%H A380667 Paolo Xausa, <a href="/A380667/b380667.txt">Table of n, a(n) for n = 0..10000</a>
%F A380667 a(n) = (A020985(n+1) - A020985(n))/2.
%t A380667 Differences[RudinShapiro[Range[0, 100]]]/2
%o A380667 (Python)
%o A380667 def A380667(n): return (1 if m else -1) if (m:=(n&(n>>1)).bit_count()&1)^((n+1&(n+1>>1)).bit_count()&1) else 0  # _Chai Wah Wu_, Jan 30 2025
%Y A380667 Cf. A020985, A020986.
%K A380667 sign,easy
%O A380667 0,3
%A A380667 _Paolo Xausa_, Jan 30 2025