OFFSET
1,3
COMMENTS
To extend the sequence S with a new term a(n), we always add to a(n-1) the last absolute difference D between two digits that must be considered. As a term of S can have two successive identical digits [like a(19) = 55 here], or, in general, as two successive digits of S can be identical, we will see sometimes in S two or more equal terms following each other [like a(27) = a(28) = a(29) = 73 here].
LINKS
Carole Dubois, Table of n, a(n) for n = 1..5002
EXAMPLE
After a(10) = 9, we cannot extend S with a(11) < 17 as the difference between a(10) and a(11) cannot be < 8, this 8 being the difference between 9 and the first digit of a(11);
After a(11) = 17, we are driven by the next absolute difference between digits, which is 6 (the difference between the 1 and the 7 of 17). We add this 6 to a(11) = 17 to get a(12) = 23; etc.
We have seen in the Comments section why we sometimes have to add 0 to a(n), which leads to a(n+1) = a(n).
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Jun 11 2020
STATUS
approved