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.

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

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

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