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.

Original entry on oeis.org

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, 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, 1, -1, 1, 0, 0, -1, 1, 0, -1, 1, 0, 0, 0, -1, 0, 0, 1, -1, 1, 0, 0, -1, 1, 0
Offset: 0

Views

Author

Paolo Xausa, Jan 30 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Differences[RudinShapiro[Range[0, 100]]]/2
  • Python
    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

Formula

a(n) = (A020985(n+1) - A020985(n))/2.