login
A199408
Triangle T(n,k) = n + k - gcd(n,k) read by rows, 1 <= n, 1 <= k <= n.
3
1, 2, 2, 3, 4, 3, 4, 4, 6, 4, 5, 6, 7, 8, 5, 6, 6, 6, 8, 10, 6, 7, 8, 9, 10, 11, 12, 7, 8, 8, 10, 8, 12, 12, 14, 8, 9, 10, 9, 12, 13, 12, 15, 16, 9, 10, 10, 12, 12, 10, 14, 16, 16, 18, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 11, 12, 12, 12, 12, 16, 12
OFFSET
1,2
COMMENTS
A diagonal of an n by k rectangle drawn on a square grid passes through T(n,k) squares: the diagonal enters n squares crossing horizontal segments and enters k squares crossing vertical segments. Gcd(n,k) counts the squares entered at a lattice point, which have been over-counted.
REFERENCES
M. Ollerton, Mathematics Teacher's Handbook, Continuum, 2009, pp. 14-15.
LINKS
Association of Teachers of Mathematics, Points of Departure 1, Derby, 1972.
FORMULA
T(d*a,d*b) = d*T(a,b).
EXAMPLE
T(6,4) = 6 + 4 - 2 = 8.
Triangular array begins
1
2 2
3 4 3
4 4 6 4
5 6 7 8 5
6 6 6 8 10 6
7 8 9 10 11 12 7
8 8 10 8 12 12 14 8
PROG
(PARI) T(n, k) = n + k - gcd(n, k); \\ Michel Marcus, Aug 04 2018
CROSSREFS
Cf. A049627, A074712. Third column A061800.
Sequence in context: A081742 A377079 A127432 * A285325 A135529 A061282
KEYWORD
nonn,tabl,easy
AUTHOR
Brian Hopkins, Nov 05 2011
STATUS
approved