A050873 Triangular array T read by rows: T(n,k) = gcd(n,k).
1, 1, 2, 1, 1, 3, 1, 2, 1, 4, 1, 1, 1, 1, 5, 1, 2, 3, 2, 1, 6, 1, 1, 1, 1, 1, 1, 7, 1, 2, 1, 4, 1, 2, 1, 8, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 2, 3, 4, 1, 6, 1, 4, 3, 2, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1
Examples
Rows: 1; 1, 2; 1, 1, 3; 1, 2, 1, 4; 1, 1, 1, 1, 5; 1, 2, 3, 2, 1, 6; ...
Links
- T. D. Noe, Rows n=1..100, flattened
- Marcelo Polezzi, A Geometrical Method for Finding an Explicit Formula for the Greatest Common Divisor, The American Mathematical Monthly, Vol. 104, No. 5 (May, 1997), pp. 445-446.
- Eric Weisstein's World of Mathematics, Greatest Common Divisor
- Wikipedia, Greatest Common Divisor
Crossrefs
Programs
-
Haskell
a050873 = gcd a050873_row n = a050873_tabl !! (n-1) a050873_tabl = zipWith (map . gcd ) [1..] a002260_tabl -- Reinhard Zumkeller, Dec 12 2015, Aug 13 2013, Jun 10 2013
-
Mathematica
ColumnForm[Table[GCD[n, k], {k, 12}, {n, k}], Center] (* Alonso del Arte, Jan 14 2011 *)
-
PARI
{T(n, k) = gcd(n, k)} /* Michael Somos, Jul 18 2011 */
Formula
T(n, k) = T(k, n) = T(-n, k) = T(n, -k) = T(n, n+k) = T(n+k, k). - Michael Somos, Jul 18 2011
Comments