A327743 a(n) = smallest positive number not already in the sequence such that for each k = 1, ..., n-1, the k-th differences are distinct.
1, 2, 4, 3, 6, 11, 5, 9, 7, 13, 10, 18, 8, 15, 27, 14, 23, 12, 22, 17, 28, 16, 29, 20, 34, 19, 35, 21, 36, 32, 24, 42, 26, 43, 25, 44, 66, 33, 53, 30, 51, 31, 54, 37, 61, 39, 64, 38, 67, 40, 70, 41, 68, 47, 75, 50, 76, 45, 77, 49, 80, 48, 81, 46, 82, 52, 86
Offset: 1
Examples
Illustration of the first eight terms of the sequence. k | k-th differences --+--------------------------------- 0 | 1, 2, 4, 3, 6, 11, 5, 9 1 | 1, 2, -1, 3, 5, -6, 4 2 | 1, -3, 4, 2, -11, 10 3 | -4, 7, -2, -13, 21 4 | 11, -9, -11, 34 5 | -20, -2, 45 6 | 18, 47 7 | 29
Links
- Peter Kagey, Table of n, a(n) for n = 1..5000
Crossrefs
Programs
-
Mathematica
a[1] = 1; a[n_] := a[n] = For[aa = Array[a, n-1]; an = 1, True, an++, If[FreeQ[aa, an], aa = Append[aa, an]; If[AllTrue[Range[n-1], Unequal @@ Differences[ aa, #]&], Return[an]]]]; a /@ Range[1, 100] (* Jean-François Alcover, Oct 26 2019 *)
Extensions
"Infinite" added to definition (for otherwise the one-term sequence 1 is earlier). - N. J. A. Sloane, Sep 25 2019
Changed definition to avoid use of "Lexicographically earliest infinite sequence" and the associated existence questions. - N. J. A. Sloane, Sep 28 2019
Comments