login
A196368
Characteristic function of numbers having in decimal representation only distinct adjacent digits.
7
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
0
COMMENTS
a(A043096(n)) = 1; a(A171901(n)) = 0;
A178788(n) <= a(n).
MATHEMATICA
If[MemberQ[Differences[IntegerDigits[#]], 0]==True, 0, 1]&/@Range[0, 90] (* Harvey P. Dale, Sep 05 2013 *)
PROG
(Haskell)
a196368 n = fromEnum $ and $ zipWith (/=) (tail $ show n) (show n)
a196368_list = map a196368 [0..]
(Python)
A196368_list = [int(all(str(n)[i] != str(n)[i-1] for i in range(1, len(str(n))))) for n in range(10000)] # Chai Wah Wu, Feb 14 2019
CROSSREFS
Sequence in context: A089829 A294935 A242902 * A178788 A131217 A105567
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Oct 28 2011
STATUS
approved