|
|
A226246
|
|
Triangle T(n, k), read by rows 1<=n, 1<=k<=n: Number of cells touched by a unit-width diagonal in a regular n X k grid
|
|
2
|
|
|
1, 2, 4, 3, 6, 7, 4, 8, 10, 10, 5, 8, 11, 14, 13, 6, 10, 14, 14, 16, 16, 7, 12, 13, 16, 19, 20, 19, 8, 14, 16, 20, 20, 22, 24, 22, 9, 14, 17, 18, 21, 22, 25, 28, 25, 10, 16, 20, 20, 26, 24, 28, 30, 30, 28, 11, 18, 21, 22, 25, 26, 29, 30, 33, 34, 31
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
REFERENCES
|
J. D. E. Konhauser, D. J. Velleman and S. Wagon, Which Way Did the Bicycle Go?, Cambridge University Press, 1996, page 179.
|
|
LINKS
|
|
|
FORMULA
|
Let g := gcd(n,k), r := sqrt(n*n+k*k)/2.
T(n,k) = n+k+g+2*(g*floor(r/g)-floor(r/min(n,k))-1)
|
|
EXAMPLE
|
A paintbrush of unit width is dragged centrally along the diagonal of a rectangular 5 X 7 grid. The number of squares in the grid which contain paint in their interiors is T(5,7) = 19.
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|