login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A109004 Table of GCD(n,m) read by antidiagonals, n >= 0, m >= 0. 15
0, 1, 1, 2, 1, 2, 3, 1, 1, 3, 4, 1, 2, 1, 4, 5, 1, 1, 1, 1, 5, 6, 1, 2, 3, 2, 1, 6, 7, 1, 1, 1, 1, 1, 1, 7, 8, 1, 2, 1, 4, 1, 2, 1, 8, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 12, 1, 2, 3, 4, 1, 6, 1, 4, 3, 2, 1, 12, 13, 1, 1, 1, 1, 1, 1, 1 (list; table; graph; refs; listen; history; internal format)
OFFSET

0,4

REFERENCES

L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 1, p. 335.

R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, 2nd ed., 1994, ch. 4.

D. E. Knuth, The Art of Computer Programming, Addison-Wesley, section 4. 5. 2

FORMULA

a(n, m) = a(m, n) = a(m, n-m) = a(m, n mod m), n >= m.

a(n, m) = n + m - n*m + 2*sum_k=1..m-1 floor(k*n/m).

Multiplicative in both parameters with a(p^e, m) = GCD(p^e, m). David W. Wilson (davidwwilson(AT)comcast.net) Jun 12, 2005.

EXAMPLE

0; 1, 1; 2, 1, 2; 3, 1, 1, 3; 4, 1, 2, 1, 4; 5, 1, 1, 1, 1, 5; ...

PROG

(PARI) {a(n, m) = gcd( n, m)}

(PARI) {a(n, m) = local(x); n = abs(n); m = abs(m); if( !m, n, -2 * sum( k=1, m, x = k * n / m; x - floor( x) - 1/2))} /* Michael Somos May 22 2011 */

CROSSREFS

Rows, columns and diagonals: A089128, A109007, A109008, A109009, A109010, A109011, A109012, A109013, A109014, A109015.

A003989 is (1, 1) based.

Sequence in context: A133232 A137152 A159335 * A103823 A136642 A080382

Adjacent sequences:  A109001 A109002 A109003 * A109005 A109006 A109007

KEYWORD

nonn,easy,mult,tabl

AUTHOR

Mitch Harris (Harris.Mitchell(AT)mgh.harvard.edu)

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 06:27 EST 2012. Contains 205998 sequences.