login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #40 Oct 05 2024 13:57:22

%S 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,

%T 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,

%U -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,3,12,20,34,38,81,88,94,104,109

%N 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.

%H Martin Becker, <a href="/A353077/b353077.txt">Rows n = 1..200 of triangle, flattened</a>.

%H Leonard E. Dickson, <a href="https://doi.org/10.2307/2968498">Problem 142</a>, The American Mathematical Monthly, Vol. 14, No. 5 (May, 1907), pp. 107-108.

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PerfectDifferenceSet.html">Perfect Difference Set</a>

%e n row

%e 1 [0];

%e 2 [0,1];

%e 3 [0,1,3];

%e 4 [0,1,3,9];

%e 5 [0,1,4,14,16];

%e 6 [0,1,3,8,12,18];

%e 7 no solution exists;

%e 8 [0,1,3,13,32,36,43,52];

%e 9 [0,1,3,7,15,31,36,54,63];

%e 10 [0,1,3,9,27,49,56,61,77,81];

%e 11 no solution exists;

%e 12 [0,1,3,12,20,34,38,81,88,94,104,109];

%e 13 no solution exists;

%e 14 [0,1,3,16,23,28,42,76,82,86,119,137,154,175];

%e 15 no solution exists;

%e 16 no solution exists.

%o (PARI) isok(n, v) = my(p=n*(n-1)+1); setbinop((x,y)->lift(Mod(x-y, p)), v, v) == [0..p-1];

%o row(n) = forsubset([n^2-n+1, n], s, my(ds = apply(x->x-1, Vec(s))); if (isok(n, ds), return(ds)););

%Y Cf. A002061, A058241, A351690, A333852.

%K sign,look,tabl

%O 1,6

%A _Michel Marcus_, Apr 22 2022

%E Name and data corrected for "lexicographically earliest solution" by _Michel Marcus_, May 09 2022

%E Adjusted to a regular triangle, and rows 1, 2, 7, and 10-12 inserted by _Pontus von Brömssen_, May 09 2022