%I #13 Apr 08 2023 11:44:23
%S 3,4,1,2,7,8,5,6,22,23,9,40,50,20,27,24,25,26,33,34,35,44,10,11,13,14,
%T 15,16,17,45,46,47,18,12,19,21,29,41,51,28,36,55,56,60,30,31,32,52,37,
%U 38,39,48,61,62,70,42,43,63,71,72,49,54,57,77,73,80,53,100,111,58,59,64,65
%N Smallest positive integer a(n) not yet in the sequence and sharing no digit with n, (n-1) or (n+1) in its decimal representation.
%C Sequence has 1234567 terms, ending with a(1234567) = 9990990999. - _Michael S. Branicky_, Apr 08 2023
%H Michael S. Branicky, <a href="/A171073/b171073.txt">Table of n, a(n) for n = 1..10000</a>
%H Michael S. Branicky, <a href="/A171073/a171073.py.txt">Python program</a>
%t f[s_List] := Block[{k = 1, len = Length@s}, id = Union@ Flatten[ IntegerDigits /@ {len, len + 1, len + 2}]; While[ MemberQ[s, k] || Intersection[id, IntegerDigits@k] != {}, k++ ]; Append[s, k]]; Nest[f, {}, 73] (* _Robert G. Wilson v_, Sep 25 2010 *)
%o (Python) # see linked program generating full sequence
%Y Cf. A171072. - _Robert G. Wilson v_, Sep 25 2010
%K nonn,base,fini
%O 1,1
%A _N. J. A. Sloane_, Sep 06 2010, based on an email from _Eric Angelini_, Jun 30 2010
%E a(22) inserted, a(25) and a(26) corrected, etc. by _Robert G. Wilson v_, Sep 25 2010
%E a(42) corrected by _Michael S. Branicky_, Apr 08 2023