login
Rectangular array read by antidiagonals: a(m,n) = greatest noncomposite (1 or prime) that divides both m and n.
1

%I #12 Dec 08 2015 02:12:23

%S 1,1,1,1,2,1,1,1,1,1,1,2,3,2,1,1,1,1,1,1,1,1,2,1,2,1,2,1,1,1,3,1,1,3,

%T 1,1,1,2,1,2,5,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,3,2,1,3,1,2,3,2,1,1,1,

%U 1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,7,2,1,2,1,2,1,1,1,3,1,5,3,1,1,3,5,1,3,1,1

%N Rectangular array read by antidiagonals: a(m,n) = greatest noncomposite (1 or prime) that divides both m and n.

%C The array is symmetric along the diagonal, so there is a triangular version with the same amount of information that reads the array along rows up to the diagonal: 1,1,2,1,1,3,1,2,1,2,1,1,1,1,5,1,... - _R. J. Mathar_, Apr 29 2009

%p A159923 := proc(n,m) local g; for g from max(n,m) to 2 by -1 do if isprime(g) and (n mod g) = 0 and (m mod g) = 0 then RETURN(g) ; fi; od: RETURN(1) ; end: for d from 2 to 22 do for m from 1 to d-1 do n := d-m ; printf("%d,", A159923(n,m)) ; od: od: # _R. J. Mathar_, Apr 29 2009

%K nonn,tabl

%O 1,5

%A _Leroy Quet_, Apr 26 2009

%E More terms from _R. J. Mathar_, Apr 29 2009