OFFSET
1,5
COMMENTS
Each value is determined by placing the least possible nonnegative integer that will abide by the rules of the sequence.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10011 (rows for n = 1..141, flattened)
Rémy Sigrist, Colored representation of the first 500 rows (where the hue is function of T(n,k))
Rémy Sigrist, Colored scatterplot of (x, y) such that T(n, k) = T(n+x, k+y) and max(n, n+x) <= 500 and (x, y) <> (0, 0) (where the hue is function of T(n, k))
Rémy Sigrist, PARI program for A337804
EXAMPLE
Triangle begins:
0;
0, 0;
1, 2, 1;
0, 3, 4, 0;
3, 5, 2, 6, 3;
2, 7, 8, 5, 1, 9;
...
PROG
(PARI)
T(n)={my(v=vector(n), S=Set(), L=List());
for(n=1, #v, v[n]=vector(n); for(k=1, n, my(i=1);
while(i<=#L, my(P=Set([[n-p[1], k-p[2]] | p<-L[i]])); if(!#setintersect(P, S), S = setunion(S, P); break); i++);
if(i>#L, listput(L, []));
L[i] = concat(L[i], [[n, k]]);
v[n][k] = i-1 )); v
}
concat(T(12)) \\ Andrew Howroyd, Sep 24 2020
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Aidan Clarke, Sep 22 2020
EXTENSIONS
Terms a(46) and beyond from Andrew Howroyd, Sep 24 2020
STATUS
approved