login
A082218
Square array T(i,j) in which for every k, the k-th partial sums of every row and column are divisible by k. Array read by antidiagonals, alternating upwards and downwards. Each entry is the least number not already used that fits the divisibility requirement.
6
1, 3, 5, 6, 7, 2, 10, 12, 8, 4, 9, 14, 13, 16, 19, 25, 15, 37, 21, 23, 11, 20, 17, 22, 29, 26, 35, 24, 28, 36, 18, 32, 38, 44, 40, 48, 31, 56, 33, 68, 43, 50, 39, 34, 41, 27, 47, 61, 53, 57, 45, 75, 85, 93, 55, 30, 49, 65, 63, 72, 67, 88, 69, 62, 73, 51, 81, 83, 80, 70, 128, 42
OFFSET
1,2
COMMENTS
In the square array T shown above, numbers (not occurring earlier) are entered like this, T(1, 1), T(1, 2), T(2, 1), T(3, 1), T(2, 2), T(1, 3), T(1, 4), T(2, 3), T(3, 2), T(4, 1), T(5, 1), T(4, 2), ... in such a way that every n-th partial sum of a row or a column is a multiple of n.
T(i, j) must satisfy a congruence mod i and another congruence mod j. i and j are not always relatively prime, but this pair of congruences is always solvable. See the link for a proof. - David Wasserman, Aug 26 2004
LINKS
EXAMPLE
Square array T(i,j) (with rows i >= 1 and columns j >= 1) begins
1, 3, 2, 10, 19, 25, ...
5, 7, 12, 16, 15, ...
6, 8, 13, 37, ...
4, 14, 21, ...
9, 23, ...
11, ...
...
From Petros Hadjicostas, Feb 25 2021: (Start)
We start with T(1,1) = 1.
T(1,2) = 3 because i = 1, j = 2, and 1 + 3 = 4 which is divisible by j = 2. (We rejected 2 because 1 + 2 = 3, which is not divisible by 2.)
T(2,1) = 5 because i = 2 > 1, j = 1, and 1 + 5 = 6, which is divisible by j = 2. (We rejected 2 because 1 + 2 = 3, which is not divisible by j = 2. For the same reason, we rejected 4 because 1 + 4 = 5.)
T(3,1) = 6 because i = 3 > 1, j = 1, and 1 + 5 + 6 = 12, which is divisible by i = 3. (We rejected 2 because 1 + 5 + 2 = 8, which is not divisible by i = 3. For the same reason, we rejected 4 because 1 + 5 + 4 = 10.)
T(2,2) = 7 because i = 2 = j, 5 + 7 = 12, which is divisible by i = 2, and 3 + 7 = 10, which is divisible by j = 2. (We rejected 2, because 5 + 2 = 7 is not divisible by i = 2. We also rejected 4 because 5 + 4 = 9 is not divisible by i = 2.)
T(1,3) = 2 because i = 1, j = 3, and 1 + 3 + 2 = 6, which is divisible by j = 3. (End)
PROG
(PARI) lista(nn) = { my(a=matrix(nn, nn)); S=Set();
for(s=2, nn+1, if(s%2, i0=1; i1=s-1; i2=1, i0=s-1; i1=1; i2=-1);
forstep(i=i0, i1, i2, j=s-i;
ii=sum(k=1, j-1, a[i, k]); jj=sum(k=1, i-1, a[k, j]);
c=chinese(Mod(ii, j), Mod(jj, i));
t=component(c, 1)-lift(c); while(setsearch(S, t), t+=component(c, 1));
a[i, j]=t; S=setunion(S, [t]);
print1(", ", sum(k=1, j, a[i, j])/j); ))} \\ This is a modification of Max Alekseyev's PARI program from A082219. - Petros Hadjicostas, Feb 25 2021
CROSSREFS
KEYWORD
nonn,easy,tabl
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Apr 09 2003
EXTENSIONS
Edited and extended by David Wasserman, Aug 26 2004
STATUS
approved