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!)
A184992 a(n) is the least positive integer not occurring earlier that shares a digit with a(n-1); a(1)=1. 16
1, 10, 11, 12, 2, 20, 21, 13, 3, 23, 22, 24, 4, 14, 15, 5, 25, 26, 6, 16, 17, 7, 27, 28, 8, 18, 19, 9, 29, 32, 30, 31, 33, 34, 35, 36, 37, 38, 39, 43, 40, 41, 42, 44, 45, 46, 47, 48, 49, 54, 50, 51, 52, 53, 55, 56, 57, 58, 59, 65, 60, 61, 62, 63, 64, 66, 67, 68, 69, 76, 70, 71, 72, 73 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A permutation of the positive integers.
LINKS
MATHEMATICA
FromDigits /@ Nest[Function[a, Append[a, Block[{k = 2, d}, While[Nand[FreeQ[a, #], IntersectingQ[a[[-1]], #]] &@ Set[d, IntegerDigits@ k], k++]; d]]], {{1}}, 73] (* Michael De Vlieger, Mar 17 2018 *)
PROG
(PARI) A184992(n, show=0)={my(a=1, u=2^1); for(k=2, n, show && print1(a", "); a=Set(Vec(Str(a))); for(j=2, 9e9, bittest(u, j) && next; setintersect(Set(Vec(Str(j))), a) || next; u+=2^a=j; break)); a} \\ M. F. Hasler, Dec 22 2011
(Haskell)
import Data.List (delete, intersect); import Data.Function (on)
a184992 n = a184992_list !! (n-1)
a184992_list = 1 : f 1 [2..] where
f u vs = v : f v (delete v vs)
where v : _ = filter (not . null . (intersect `on` show) u) vs
-- Reinhard Zumkeller, Jul 01 2013
CROSSREFS
a(n) = A107353(n) for n>=3. - Alois P. Heinz, Dec 22 2011
Cf. A227118 (inverse); A067581.
Sequence in context: A097585 A063671 A330024 * A162501 A286890 A262323
KEYWORD
nonn,base
AUTHOR
Eric Angelini, Dec 22 2011
STATUS
approved

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 23 07:42 EDT 2024. Contains 371905 sequences. (Running on oeis4.)