cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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").

Original entry on oeis.org

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

Views

Author

Eric Angelini, May 12 2023

Keywords

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.

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 *)