OFFSET
1,1
COMMENTS
The spread of n is the absolute difference between the leftmost digit of n and the rightmost digit of n. Spreads vary from 0 to 9.
EXAMPLE
a(1) = 10 with spread 1;
a(2) = 11 with spread 0;
a(3) = 12 with spread 1;
a(4) = 21 with spread 1;
a(5) = 23 with spread 1;
a(6) = 13 with spread 2; etc.
We see that the above succession of spreads is the digits' succession of S.
MATHEMATICA
a[1]=10; a[n_]:=a[n]=Block[{k=10}, While[Abs[First@#-Last@#]&@IntegerDigits[k][[{1, -1}]]!=Flatten[IntegerDigits/@Array[a, n-1]][[n]]||MemberQ[Array[a, n-1], k], k++]; k]; Array[a, 72] (* Giorgos Kalogeropoulos, May 12 2023 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini, May 12 2023
STATUS
approved