login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A196368 Characteristic function of numbers having in decimal representation only distinct adjacent digits. 7

%I #19 Feb 14 2019 23:41:04

%S 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,

%T 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,

%U 1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1

%N Characteristic function of numbers having in decimal representation only distinct adjacent digits.

%C a(A043096(n)) = 1; a(A171901(n)) = 0;

%C A178788(n) <= a(n).

%H Reinhard Zumkeller, <a href="/A196368/b196368.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%t If[MemberQ[Differences[IntegerDigits[#]],0]==True,0,1]&/@Range[0,90] (* _Harvey P. Dale_, Sep 05 2013 *)

%o (Haskell)

%o a196368 n = fromEnum $ and $ zipWith (/=) (tail $ show n) (show n)

%o a196368_list = map a196368 [0..]

%o (Python)

%o 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

%K nonn,base

%O 0

%A _Reinhard Zumkeller_, Oct 28 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:56 EDT 2024. Contains 371964 sequences. (Running on oeis4.)