A362987 Lexicographically earliest sequence S of distinct positive terms such that the successive digits of S are the successive spreads of S' terms (see Comments for definition of "spread").
10, 11, 12, 21, 23, 13, 20, 32, 24, 14, 34, 25, 31, 22, 30, 35, 42, 15, 43, 26, 36, 37, 46, 16, 41, 45, 53, 57, 47, 33, 52, 27, 40, 64, 54, 38, 48, 58, 68, 17, 63, 28, 69, 18, 51, 39, 56, 60, 59, 65, 62, 49, 50, 74, 61, 29, 73, 70, 85, 96, 72, 75, 79, 81, 84, 44, 71, 95, 83, 105, 104, 19
Offset: 1
Examples
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.
Crossrefs
Cf. A100787.
Programs
-
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 *)
Comments