login
Lexicographically earliest sequence of distinct positive integers such that a(n) shares no digit with a(a(n)) for all n.
4

%I #22 Jan 12 2019 02:27:12

%S 2,1,4,3,6,5,8,7,10,9,12,30,14,20,16,22,18,23,21,31,33,34,40,25,36,27,

%T 35,29,37,41,42,38,44,50,46,45,48,47,43,51,52,53,55,56,60,57,58,59,54,

%U 61,62,63,64,66,67,70,68,69,71,72,73,74,75,77,76,78,80,79,81,82,83,84

%N Lexicographically earliest sequence of distinct positive integers such that a(n) shares no digit with a(a(n)) for all n.

%C This is an example of a sequence whose initial behavior is quite different from its limiting behavior. It starts out looking as though most numbers will appear in the sequence, but in fact it has density 0. It can't include any number that has all nine nonzero digits, and those have density 1. - _Franklin T. Adams-Watters_, Apr 03 2009

%H David W. Wilson, <a href="/A163501/b163501.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1)=2 shares no digit with a(a(1))=a(2)=1;

%e a(2)=1 shares no digit with a(a(2))=a(1)=2; ...

%e a(11)=12 shares no digit with a(a(11))=a(12)=30, etc.

%e In building the sequence, always use the smallest available positive integer not yet present in the sequence.

%Y Cf. A152200 (complement), A152208 (a variant), A152209.

%K base,nonn

%O 1,1

%A _Eric Angelini_, Jul 29 2009

%E Terms discussed, checked and computed by _Paolo P. Lava_, _Jacques Tramu_ and _Farideh Firoozbakht_

%E Edited by _Max Alekseyev_, Feb 11 2012