OFFSET
1,2
COMMENTS
The pair of digits adjacent to the comma between two terms forms an integer that is the difference between the said terms, but read backwards. This is the lexicographically earliest sequence with this property, provide the largest next term is always chosen when there is a choice. The sequence ends after 2514 steps with a(2514) = 99952.
LINKS
Eric Angelini, Commas variants, personal blog, Sept 2023.
EXAMPLE
After a(1) = 1, we have multiple choices for a(2); they are 12, 22, 32, 42, 52, 62, 72, 82 and 92. We keep 92 for a(2) as 92 is the largest term.
a(1) = 1 and a(2) = 92 are separated by 91 units, and 91 is 19 backwards (or 1,9);
a(2) = 92 and a(3) = 104 are separated by 12 units, and 12 is 21 backwards (or 2,1);
a(3) = 104 and a(4) = 118 are separated by 14 units, and 14 is 41 backwards (or 4,1);
a(4) = 118 and a(5) = 136 are separated by 18 units, and 18 is 81 backwards (or 8,1); etc.
The next choices we encountered (keeping the largest term) were after a(8) = 178 -> {196,206}, then after 812 -> {894,904}, 1976 -> {1992,2002}, 3956 -> {3992,4002}, 19984 -> {19998,20008}, 39958 -> {39996,40006}, 49952 -> {49994,50004}, etc.
MATHEMATICA
NestList[(s=#; li=First@*IntegerDigits/@Table[s+10*k+Mod[s, 10], {k, 9}]-Range@9;
Last@Table[s+FromDigits@Join[Position[li, 0][[c]], {Mod[s, 10]}], {c, Length@Position[li, 0]}])&, 1, 2513]
CROSSREFS
KEYWORD
base,nonn,fini
AUTHOR
Eric Angelini and Giorgos Kalogeropoulos, Sep 21 2023
STATUS
approved