login
A353077
Triangle read by rows, where the n-th row consists of the lexicographically earliest solution for n integers in 0..p-1 whose n*(n-1) differences are congruent to 1..p-1 (mod p), where p=n*(n-1)+1. If no solution exists, the n-th row consists of n -1's.
2
0, 0, 1, 0, 1, 3, 0, 1, 3, 9, 0, 1, 4, 14, 16, 0, 1, 3, 8, 12, 18, -1, -1, -1, -1, -1, -1, -1, 0, 1, 3, 13, 32, 36, 43, 52, 0, 1, 3, 7, 15, 31, 36, 54, 63, 0, 1, 3, 9, 27, 49, 56, 61, 77, 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 3, 12, 20, 34, 38, 81, 88, 94, 104, 109
OFFSET
1,6
LINKS
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
KEYWORD
sign,look,tabl
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