login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A335492
The successive absolute differences between two digits are the successive absolute differences between two terms.
2
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 11, 17, 17, 17, 23, 29, 35, 41, 47, 42, 43, 44, 37, 31, 33, 32, 35, 38, 41, 44, 46, 48, 49, 50, 50, 51, 55, 59, 57, 59, 59, 59, 58, 59, 61, 63, 68, 64, 67, 70, 70, 70, 72, 74, 78, 82, 77, 73, 78, 83, 88, 93, 89, 85, 85, 85, 81, 85, 87, 89, 93, 97, 101, 105, 109, 113, 110
OFFSET
1,3
COMMENTS
To extend the sequence S with a new term a(n), we always try to subtract from a(n-1) the last absolute difference D between two digits that we must consider. If a(n) is already in S, we add D to a(n-1) instead of subtracting, even if this new a(n) is already in S.
Note that a(n) is sometimes < a(n-1).
LINKS
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). As a(11) - 6 = 11 and this 11 is not yet in S, we keep this 11 as a(12);
After a(12) = 11, the next absolute difference between two digits that we must consider is 6 again (this 6 comes from the difference between the 7 of 17 and the first 1 of 11); but as a(12) = 11 and 11 - 6 is 5, we won't accept this 5 for a(13) as 5 is already in S; we then add 6 to a(12) instead of subtracting, and we produce another 17 in S (this is allowed as we are adding an absolute difference, not subtracting). So a(13) is now 17;
After a(13) = 17, the next absolute difference between two digits that we must consider is 0 (this 0 comes from the difference between the two 1s of 11); so a(14) = 17; etc.
CROSSREFS
Cf. A335493 [same idea but a(n) is never < a(n-1)].
Sequence in context: A048407 A322260 A133504 * A108971 A179977 A326298
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Jun 11 2020
STATUS
approved