OFFSET
1,6
LINKS
Martin Becker, Rows n = 1..200 of triangle, flattened.
Leonard E. Dickson, Problem 142, The American Mathematical Monthly, Vol. 14, No. 5 (May, 1907), pp. 107-108.
Eric Weisstein's World of Mathematics, Perfect Difference Set
EXAMPLE
n row
1 [0];
2 [0,1];
3 [0,1,3];
4 [0,1,3,9];
5 [0,1,4,14,16];
6 [0,1,3,8,12,18];
7 no solution exists;
8 [0,1,3,13,32,36,43,52];
9 [0,1,3,7,15,31,36,54,63];
10 [0,1,3,9,27,49,56,61,77,81];
11 no solution exists;
12 [0,1,3,12,20,34,38,81,88,94,104,109];
13 no solution exists;
14 [0,1,3,16,23,28,42,76,82,86,119,137,154,175];
15 no solution exists;
16 no solution exists.
PROG
(PARI) isok(n, v) = my(p=n*(n-1)+1); setbinop((x, y)->lift(Mod(x-y, p)), v, v) == [0..p-1];
row(n) = forsubset([n^2-n+1, n], s, my(ds = apply(x->x-1, Vec(s))); if (isok(n, ds), return(ds)); );
CROSSREFS
AUTHOR
Michel Marcus, Apr 22 2022
EXTENSIONS
Name and data corrected for "lexicographically earliest solution" by Michel Marcus, May 09 2022
Adjusted to a regular triangle, and rows 1, 2, 7, and 10-12 inserted by Pontus von Brömssen, May 09 2022
STATUS
approved