[seqfan] Continued: Help needed with Mathematica program for square array with two linked recurrences.
Mats Granvik
mgranvik at abo.fi
Sat Jul 9 23:49:39 CEST 2011
The Mathematica program attempt should have been:
Clear[t, n, k, i, nn];
nn = 12;
t[1, 1] = 3;
t[1, 2] = 2;
t[2, 1] = 2;
t[1, k_] :=
t[1, k] =
If[k > 2,
t[1, k -
1] + (-t[1, k - 1] - Sum[t[1 + i, k], {i, 1, k - 1}])/(k + 1)];
t[n_, 1] :=
t[n, 1] =
If[n > 2,
t[n - 1,
1] + (-t[n - 1, 1] - Sum[t[n, 1 + i], {i, 1, n - 1}])/(n + 1)];
t[n_, k_] :=
t[n, k] =
If[And[n > 1, k > 1],
If[n >= k, -Sum[t[n - i, k], {i, 1, k - 1}], -Sum[
t[k - i, n], {i, 1, n - 1}]]];
MatrixForm[Table[Table[t[n, k], {k, 1, nn}], {n, 1, nn}]]
And not the version I sent earlier.
Mats Granvik
More information about the SeqFan
mailing list