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

A193278
Triangle T(n, k) where T(n, k) = T(k, n), T(n, n*k) = k, and T(n, n+k) = T(n, k) if k not divisible by n.
0
1, 2, 1, 3, 2, 1, 4, 2, 3, 1, 5, 2, 2, 4, 1, 6, 3, 2, 2, 5, 1, 7, 2, 3, 3, 2, 6, 1, 8, 4, 2, 2, 2, 3, 7, 1, 9, 2, 3, 4, 4, 2, 2, 8, 1, 10, 5, 3, 2, 2, 2, 3, 4, 9, 1, 11, 2, 2, 3, 5, 5, 3, 2, 2, 10, 1, 12, 6, 4, 3, 2, 2, 2, 2, 3, 5, 11, 1, 13, 2, 3, 4, 2, 6
OFFSET
1,2
COMMENTS
The function T(n, k) is defined for k>n but only the values for 1 <= k <= n as a triangular array are listed here.
EXAMPLE
{1}; {2, 1}; {3, 2, 1}; {4, 2, 3, 1}; {5, 2, 2, 4, 1}; {6, 3, 2, 2, 5, 1}; ...
MATHEMATICA
T[ n_, k_] := If[ n < 1 || k < 1, 0, If[ Mod[n, k] == 0 || Mod[k, n] == 0, Max[n, k] / Min[n, k], T[ k, Mod[ n, k, 1]]]]
PROG
(PARI) {T(n, k) = if( n<1 || k<1, 0, if( n%k == 0 || k%n == 0, max(n, k) / min(n, k), T(k, (n-1)%k + 1)))}
CROSSREFS
Sequence in context: A294733 A275724 A375025 * A337632 A057058 A334441
KEYWORD
nonn,tabl
AUTHOR
Michael Somos, Jul 20 2011
STATUS
approved