The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A030283 a(0) = 0; for n>0, a(n) is the smallest number greater than a(n-1) which does not use any digit used by a(n-1). 16

%I #20 Aug 24 2015 02:46:13

%S 0,1,2,3,4,5,6,7,8,9,10,22,30,41,50,61,70,81,90,111,200,311,400,511,

%T 600,711,800,911,2000,3111,4000,5111,6000,7111,8000,9111,20000,31111,

%U 40000,51111,60000,71111,80000,91111,200000,311111,400000,511111,600000

%N a(0) = 0; for n>0, a(n) is the smallest number greater than a(n-1) which does not use any digit used by a(n-1).

%C The sequence is infinite.

%H Reinhard Zumkeller, <a href="/A030283/b030283.txt">Table of n, a(n) for n = 0..5000</a>

%t a = {0}; For[n = 1, n < 1000000, n++, If[Length[Intersection[IntegerDigits[n], IntegerDigits[a[[ -1]]]]] == 0, AppendTo[a, n]]]; a (* _Stefan Steinerberger_, May 30 2007 *)

%o (Haskell)

%o a030283 n = a030283_list !! n

%o a030283_list = 0 : f 1 9 0 where

%o f u v w = w' : f u' v' w' where

%o w' = until (> w) ((+ v) . (* 10)) u

%o (u',v') = h u v

%o h 1 0 = (2,2); h 9 0 = (1,1); h 9 1 = (2,0); h 9 9 = (1,0)

%o h u 2 = (u+1,0); h u v = (u+1,1-v)

%o -- _Reinhard Zumkeller_, May 03 2012

%Y Cf. A068860, A068861.

%Y Cf. A030283, A229363, A229364.

%K nonn,base,nice

%O 0,3

%A _Patrick De Geest_

%E Edited by _N. J. A. Sloane_ at the suggestion of _Rick L. Shepherd_, Sep 27 2007

%E Definition clarified by _Harvey P. Dale_, Oct 19 2012

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 June 6 11:42 EDT 2024. Contains 373127 sequences. (Running on oeis4.)