The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A074712 Number of (interiors of) cells touched by a diagonal in a regular m X n grid (enumerated antidiagonally). 4
1, 2, 2, 3, 2, 3, 4, 4, 4, 4, 5, 4, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 6, 7, 4, 7, 6, 7, 8, 8, 6, 8, 8, 6, 8, 8, 9, 8, 9, 8, 5, 8, 9, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 10, 9, 8, 11, 6, 11, 8, 9, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Alberto L. Delgado's Problem of the Week No. 145.
FORMULA
T(m, n) = m + n - 1 if m and n are coprime; T(m, n) = d * T(m/d, n/d) where d is the greatest common divisor of m and n, otherwise.
T(m, n) = m + n - gcd(m, n). - Luc Rousseau, Sep 15 2017
EXAMPLE
The array begins:
1 2 3 4 5 6 7 8
2 2 4 4 6 6 8 8
3 4 3 6 7 6 9 10
4 4 6 4 8 8 10 8
5 6 7 8 5 10 11 12
6 6 6 8 10 6 12 12
7 8 9 10 11 12 7 14
8 8 10 8 12 12 14 8
...
MAPLE
A074712 := proc(m, n) local d: d:=gcd(m, n): if(d=1)then return m+n-1: else return d*procname(m/d, n/d): fi: end: seq(seq(A074712(n-d+1, d), d=1..n), n=1..8); # Nathaniel Johnston, May 09 2011
MATHEMATICA
T[m_, n_]=m+n-GCD[m, n]; Table[T[m, s-m], {s, 2, 10}, {m, 1, s-1}]//Flatten (* Luc Rousseau, Sep 16 2017 *)
PROG
(PARI) (T(m, n)=m+n-gcd(m, n)); for(s=2, 10, for(m=1, s-1, n=s-m; print1(T(m, n), ", "))) \\ Luc Rousseau, Sep 16 2017
CROSSREFS
Cf. A199408.
Sequence in context: A127095 A249871 A330408 * A271914 A087735 A322630
KEYWORD
easy,nonn,tabl
AUTHOR
Jens Voß, Sep 04 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 8 09:36 EDT 2024. Contains 373217 sequences. (Running on oeis4.)