|
|
A171901
|
|
Numbers with at least two identical neighboring digits in their decimal representation.
|
|
15
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
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
(Python)
def is_ok(n):
s = str(n)
return any(s[i] == s[i - 1] for i in range(1, len(s)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|