%I #8 Nov 07 2016 10:42:30
%S 1,2,4,8,16,10,9,18,17,24,20,22,44,40,36,30,27,25,23,21,19,28,26,32,
%T 29,31,34,37,74,67,60,54,49,45,41,42,38,35,70,63,57,50,55,110,99,90,
%U 81,73,66,72,65,59,64,58,53,48,52,47,43,39,78,71,88,80,160,100,101,91,82,84,76,69,75,68,62,56,51,46
%N The digits of the absolute difference |a(n+1)-a(n)| are a sub(multi)set of the digits of a(n): Lexicographically first sequence with this property and without negative or repeated terms.
%C In contrast to A277845, the order of the digits does not matter: for example, if a(n) = 123, the difference with the next term might be 21, 31, or 32, which is not possible in A277845 or in A277858.
%C This sequence differs from A277858 and A277845 from a(63) = 71 + 17 = 88 on, while A277858(63) = A277845(63) = 71 + 71 = 142. In contrast to A277858 and A277845 in which the 12 numbers {3, 5, 6, 7, 11, 12, 13, 14, 15, 33, 46, 61} do not appear, the number 46 = a(78) is in this sequence, and only the other 11 numbers are missing here.
%C It is easy to prove that this is not a permutation of the positive integers: for example, the number 5 cannot occur anywhere later in the sequence, since it has no possible successor (10 being already used). Relaxing the defining condition to "each digit of |a(n+1)-a(n)| is a digit of a(n)" (e.g., a step of 11 would be allowed after 123), leads to the variant A276070 which is a permutation.
%o (PARI) /* 'a' subsequence of 'b'?*/ ss(a, b, i=1, k=1)={while(k < #b && #b-k >= #a-i, b[k] == a[i] && (i==#a || ss(a, b, i+1, k+1)) && return(1); k++); k==#b && i==#a && b[k] == a[i]}
%o AA277846(n, a=1, g=1)={u=[]; for(n=2, n, g&&print1(a", "); u=setunion(u, [a]); d=vecsort(digits(a)); for(k=u[1]+1, 2*a, (!setsearch(u, k) && ss(vecsort(digits(abs(a-k))), d))||next; p==a && u=setminus(u, [b]); p=a; a=k; next(2)); g&&print1("-- no: delete "a", go back to "); b=a; a=p); a} \\ This implementation of backtracking is actually not required.
%Y Cf. A277845, A277858, A276070.
%K nonn,base
%O 1,2
%A _M. F. Hasler_, Nov 05 2016