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.

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.

Original entry on oeis.org

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

Views

Author

Peter Kagey, Sep 24 2019

Keywords

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

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
		

Crossrefs

Cf. A175498.
First differences: A327452; leading column of difference triangle: A327457.
If ALL terms of the difference triangle must be distinct, see A327460 and A327762.
Cf. A005282.

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