OFFSET
1,2
COMMENTS
Is this sequence a permutation of the positive integers?
Does each k-th difference contain all nonzero integers?
It is not difficult to show that if a(1), ..., a(k) satisfy the requirements, then any sufficiently large number is a candidate for a(k+1). So a(k) exists for all k. - N. J. A. Sloane, Sep 24 2019
The original definition was "Lexicographically earliest infinite sequence of distinct positive integers such that for every k >= 1, the k-th differences are distinct."
If only first differences are considered, one gets the classical Mian-Chowla sequence A005282. - M. F. Hasler, Oct 09 2019
LINKS
Peter Kagey, Table of n, a(n) for n = 1..5000
EXAMPLE
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
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 *)
KEYWORD
nonn,nice
AUTHOR
Peter Kagey, Sep 24 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
STATUS
approved