login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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