login
A228276
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.
5
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, 198, 21, 91, 32, 181, 130, 170, 131, 82, 120, 80, 101, 89, 109, 23, 69, 27, 14, 28, 54, 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
OFFSET
1,2
COMMENTS
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
LINKS
E. Angelini, Add neighbours, use their digits, SeqFan list, Nov. 2, 2013
E. Angelini, Add A to B
E. Angelini, Add A to B [Cached copy, with permission]
EXAMPLE
We see that the result of 1+10 uses only digits from the set {1,1,0} (really a multi-set).
The same with 10+2 which use some elements of {1,0,2}.
Again, 2+19 uses elements of {2,1,9} for its result.
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}).
PROG
(PARI) {subseq(a, b, j)=!for(i=1, #a, while(j<#b, a[i]==b[j++]&&next(2)); return)}
{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))}
(Haskell)
import Data.List ((\\), delete)
a228276 n = a228276_list !! (n-1)
a228276_list = 1 : f 1 [2..] where
f x zs = g zs where
g (y:ys) = if null $ show (x + y) \\ (show x ++ show y)
then y : f y (delete y zs) else g ys
-- Reinhard Zumkeller, Jul 26 2014
CROSSREFS
Cf. A245586 (inverse).
Sequence in context: A364188 A326107 A005483 * A040099 A330365 A173237
KEYWORD
nonn,base,look,changed
AUTHOR
Eric Angelini and M. F. Hasler, Nov 02 2013
EXTENSIONS
Edited by N. J. A. Sloane, Dec 29 2013
STATUS
approved