login
A171901
Numbers with at least two identical neighboring digits in their decimal representation.
18
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,1
COMMENTS
A171902(n) = a(n+1) - a(n) <= 11.
Complement of A043096; A196368(a(n)) = 0.
LINKS
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 *)
PROG
(Haskell)
import Data.List (elemIndices)
a171901 n = a171901_list !! n
a171901_list = elemIndices 0 a196368_list
-- Reinhard Zumkeller, Oct 29 2001
(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
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Reinhard Zumkeller, Feb 07 2010
STATUS
approved