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

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
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
The zero-width case is A199408 (or A074712).
Sequence in context: A242424 A232271 A194277 * A216623 A378784 A297551
KEYWORD
nonn,tabl
AUTHOR
Andrew Woods, Jun 01 2013
STATUS
approved