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.

A022155 Values of n at which Golay-Rudin-Shapiro sequence A020985 is negative.

Original entry on oeis.org

3, 6, 11, 12, 13, 15, 19, 22, 24, 25, 26, 30, 35, 38, 43, 44, 45, 47, 48, 49, 50, 52, 53, 55, 59, 60, 61, 63, 67, 70, 75, 76, 77, 79, 83, 86, 88, 89, 90, 94, 96, 97, 98, 100, 101, 103, 104, 105, 106, 110, 115, 118, 120, 121, 122, 126, 131, 134, 139, 140
Offset: 1

Views

Author

Keywords

Comments

A020985(a(n)) = -1.
Or numbers n for which numbers of 1's and runs of 1's in binary representation have distinct parities: A010060(n) = 1 - A268411(n). - Vladimir Shevelev, Feb 10 2016

Crossrefs

Cf. A203463 (complement), A020985.

Programs

  • Haskell
    import Data.List (elemIndices)
    a022155 n = a022155_list !! (n-1)
    a022155_list = elemIndices (- 1) a020985_list
    -- Reinhard Zumkeller, Jan 02 2012
    
  • Mathematica
    Position[Array[RudinShapiro, 200, 0], ?Negative] - 1 // Flatten (* _Jean-François Alcover, Dec 04 2018 *)
  • Python
    from itertools import count, islice
    def A022155_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda n:(n&(n>>1)).bit_count()&1,count(max(startvalue,0)))
    A022155_list = list(islice(A022155_gen(),30)) # Chai Wah Wu, Feb 11 2023