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”).

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

%I #12 Feb 18 2018 02:50:16

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

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

%U 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

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

%H <a href="/index/Rea#Recaman">Index entries for sequences related to Recamán's sequence</a>

%e Array begins

%e 1 2 4 7 3 8 ...

%e 2 1 3 6 10 5 ...

%e 4 3 1 4 8 13 ...

%e 7 6 4 1 5 10 ...

%t 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 *)

%Y Rows give A063733, A066203, A066204. Cf. A066201 for another version.

%K nonn,easy,tabl

%O 1,2

%A _N. J. A. Sloane_, Dec 16 2001

%E More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 06 2003