

A276070


Each digit of the absolute difference a(n+1)a(n) is also a digit of a(n): lexicographic first such sequence with no repeated term.


3



1, 2, 4, 8, 16, 5, 10, 9, 18, 7, 14, 3, 6, 12, 11, 22, 20, 40, 36, 30, 27, 25, 23, 21, 19, 28, 26, 24, 46, 42, 38, 35, 32, 29, 31, 34, 37, 44, 48, 52, 47, 43, 39, 72, 45, 41, 55, 50, 100, 89, 80, 88, 96, 87, 79, 70, 63, 57, 62, 56, 51, 66, 60, 54, 49, 53, 58, 113, 82, 74, 67, 61, 77, 84, 76, 69, 75, 68, 134, 90, 81
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

This sequence is a permutation of the positive integers, in contrast to the variant A277858, which was the inspiration for this sequence but which is defined using the much stronger constraint "a(n+1)a(n) is a substring of a(n)".


LINKS

Table of n, a(n) for n=1..81.


PROG

(PARI) u=[a=1]; for(n=1, 99, print1(a", "); u=setunion(u, [a]); while(#u>2&&u[2]==u[1]+1, u=u[^1]); d=Set(digits(a)); for(k=u[1]+1, 9e9, !setsearch(u, k)&&!#setminus(Set(digits(abs(ak))), d) &&(a=k)&&break))


CROSSREFS

Cf. A277858.
Sequence in context: A261702 A033491 A050076 * A070337 A269305 A225570
Adjacent sequences: A276067 A276068 A276069 * A276071 A276072 A276073


KEYWORD

nonn,base


AUTHOR

M. F. Hasler, Nov 04 2016


STATUS

approved



