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.

A171901 Numbers with at least two identical neighboring digits in their decimal representation.

Original entry on oeis.org

11, 22, 33, 44, 55, 66, 77, 88, 99, 100, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 122, 133, 144, 155, 166, 177, 188, 199, 200, 211, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 233, 244, 255, 266, 277, 288, 299, 300, 311, 322, 330, 331, 332, 333
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 07 2010

Keywords

Comments

A171902(n) = a(n+1) - a(n) <= 11.
Complement of A043096; A196368(a(n)) = 0.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a171901 n = a171901_list !! n
    a171901_list = elemIndices 0 a196368_list
    -- Reinhard Zumkeller, Oct 29 2001
    
  • Mathematica
    Select[Range[350],SequenceCount[IntegerDigits[#],{_,x_,x_,_}]>0&] (* The program uses the SequenceCount function from Mathematica version 10 *) (* Harvey P. Dale, May 14 2016 *)
  • Python
    def is_ok(n):
        s = str(n)
        return any(s[i] == s[i - 1] for i in range(1, len(s)))
    A171901_list = [n for n in range(400) if is_ok(n)] # Chai Wah Wu, Feb 14 2019