OFFSET
1,2
COMMENTS
The function T(n, k) = T(k, n) is defined for k>n but only the values for 1 <= k <= n as a triangular array are listed here.
LINKS
G. C. Greubel, Rows n=1..100 of triangle, flattened
FORMULA
T(n, k) = - gcd(n, k) if gcd(n, k) > 1.
EXAMPLE
{1}, {2, -2}, {3, 2, -3}, {4, -2, 3, -4}, {5, 2, 2, 4, -5}, {6, -2, -3, -2 ,5, -6}, ...
MATHEMATICA
T[ n_, k_] := If[ n < 1 || k < 1, 0, If[ k > n, T[ k, n], If[ k == 1, n, If[ n > k, T[ k, Mod[ n, k, 1]], -n]]]]
PROG
(PARI) {T(n, k) = if( n<1 || k<1, 0, if( k>n, T(k, n), if( k==1, n, if( n>k, T(k, (n-1)%k + 1), -n))))}
CROSSREFS
KEYWORD
sign,tabl
AUTHOR
Michael Somos, Jul 18 2011
STATUS
approved