login
A066202
Array T(n,k) (n>=1, k>=1) read by antidiagonals: T(n,n) = 1 for all n; fill in array above diagonal by symmetry; for row n, starting at diagonal T(n,n)=1, for k > n, T(n,k) = T(n,k-1)-(k-1) if this is positive and has not already appeared in this row, otherwise T(n,k) = T(n,k-1)+(k-1).
3
1, 2, 2, 4, 1, 4, 7, 3, 3, 7, 3, 6, 1, 6, 3, 8, 10, 4, 4, 10, 8, 14, 5, 8, 1, 8, 5, 14, 21, 11, 13, 5, 5, 13, 11, 21, 13, 4, 7, 10, 1, 10, 7, 4, 13, 22, 12, 14, 16, 6, 6, 16, 14, 12, 22, 12, 21, 6, 9, 12, 1, 12, 9, 6, 21, 12, 23, 31, 15, 17, 19, 7, 7, 19, 17, 15, 31, 23, 11, 20, 5, 8, 11, 14, 1
OFFSET
1,2
EXAMPLE
Array begins
1 2 4 7 3 8 ...
2 1 3 6 10 5 ...
4 3 1 4 8 13 ...
7 6 4 1 5 10 ...
MATHEMATICA
T[n_, n_] = 1; T[n_, k_] /; k < n := T[n, k] = T[k, n]; T[n_, k_] := T[n, k] = If[t = T[n, k - 1] - (k - 1); t > 0 && FreeQ[Table[T[n, j], {j, 1, k - 1}], t], t, T[n, k - 1] + (k - 1)]; Table[T[n - k + 1, k], {n, 1, 13}, {k, 1, n}] // Flatten (* Jean-François Alcover, Feb 18 2018 *)
CROSSREFS
Rows give A063733, A066203, A066204. Cf. A066201 for another version.
Sequence in context: A140819 A138558 A111580 * A027420 A116588 A069922
KEYWORD
nonn,easy,tabl
AUTHOR
N. J. A. Sloane, Dec 16 2001
EXTENSIONS
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 06 2003
STATUS
approved