%I #48 Dec 23 2024 14:53:43
%S 1,10,2,19,72,100,3,20,4,30,5,40,6,50,7,60,8,70,9,12,79,18,13,68,113,
%T 198,21,91,32,181,130,170,131,82,120,80,101,89,109,23,69,27,14,28,54,
%U 17,24,58,117,124,90,11,200,15,36,26,37,126,93,41,273,52,163,29,63,107,123,96,71,230,73,241,83,152,64,182,31,92,119,78,102,99
%N Sum of a(n)+a(n+1) can be written using the digits of {a(n),a(n+1)}; always choose the smallest possible unused positive integer.
%C The sequence is a permutation of the natural numbers. Sketch of proof: (1) all terms are distinct by definition; (2) each term has a successor (with pandigitals as ultimate candidates); (3) an alleged non-occurring number will succeed the first occurred pandigital number. Cf. A245586. - _Reinhard Zumkeller_, Jul 26 2014
%H Reinhard Zumkeller, <a href="/A228276/b228276.txt">Table of n, a(n) for n = 1..10000</a>
%H E. Angelini, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2013-November/011829.html">Add neighbours, use their digits</a>, SeqFan list, Nov. 2, 2013
%H E. Angelini, <a href="http://www.cetteadressecomportecinquantesignes.com/WriteAB.htm">Add A to B</a>
%H E. Angelini, <a href="/A228276/a228276.pdf">Add A to B</a> [Cached copy, with permission]
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e We see that the result of 1+10 uses only digits from the set {1,1,0} (really a multi-set).
%e The same with 10+2 which use some elements of {1,0,2}.
%e Again, 2+19 uses elements of {2,1,9} for its result.
%e 72 is now the smallest integer respecting the constraint (we see that 19+72 is 91 which uses for its transcription only a few elements of {1,9,7,2}).
%o (PARI) {subseq(a,b,j)=!for(i=1,#a,while(j<#b, a[i]==b[j++]&&next(2));return)}
%o {u=0;a=1;for(n=1,99,print1(a",");u+=1<<a;for(t=1,9e9,bittest(u,t)&&next; subseq(vecsort(digits(a+t)), vecsort(concat(digits(a),digits(t))))||next;a=t;break))}
%o (Haskell)
%o import Data.List ((\\), delete)
%o a228276 n = a228276_list !! (n-1)
%o a228276_list = 1 : f 1 [2..] where
%o f x zs = g zs where
%o g (y:ys) = if null $ show (x + y) \\ (show x ++ show y)
%o then y : f y (delete y zs) else g ys
%o -- _Reinhard Zumkeller_, Jul 26 2014
%Y Cf. A234932, A234934, A234935.
%Y Cf. A245586 (inverse).
%K nonn,base,look
%O 1,2
%A _Eric Angelini_ and _M. F. Hasler_, Nov 02 2013
%E Edited by _N. J. A. Sloane_, Dec 29 2013