%I #18 Jun 03 2018 02:07:20
%S 1,5,12,41,26,103,58,181,92,293,128,439,174,617,230,817,290,1037,376,
%T 1225,446,1565,542,1883,628,2227,746,2555,848,2983,962,3409,1102,3859,
%U 1238,4331,1384,4823,1532,5345,1684,5945,1858,6539,2038,7135,2218,7801
%N Main diagonal of square array A082025.
%H Alois P. Heinz, <a href="/A082189/b082189.txt">Table of n, a(n) for n = 1..100</a>
%p b:= proc(t) false end: b(1):= true: ncpr:= proc() local i, m; m:= args[1]; for i from 2 to nargs do if igcd (m, args[i])<>1 then return true fi od; false end: T:= proc(n, k) option remember; local h, t, l; if n<1 or k<1 or n=1 and k=1 then t:=1 else h:= 1- 2* irem(n+k, 2); l:= T(n-1, k), T(n, k-1), T(n-1, k-1), T(n+h, k-h); for t while b(t) or ncpr(t, l) do od fi; b(t):= true; t end: seq (T(n, n), n=1..40); # _Alois P. Heinz_, Oct 07 2009
%t b[_] = False; b[1] = True;
%t ncpr[args_] := Module[{i, m}, m = args[[1]]; For[i = 2, i <= Length[args], i++, If[GCD[m, args[[i]]] != 1, Return[True]]]];
%t T[n_, k_] := T[n, k] = Module[{h, t, l}, If[n < 1 || k < 1 || n == 1 && k == 1, t = 1, h = 1 - 2*Mod[n + k, 2]; l = {T[n - 1, k], T[n, k - 1], T[n - 1, k - 1], T[n + h, k - h]}; For[t = 1, b[t] || ncpr[Join[{t}, l]], t++]; b[t] = True; t]];
%t Table [T[n, n], {n, 1, 40}] (* _Jean-François Alcover_, Jun 03 2018, after _Alois P. Heinz_ *)
%Y Cf. A082025, A082187, A082188, A082190.
%K nonn
%O 1,2
%A _Amarnath Murthy_, Apr 07 2003
%E Edited and more terms from _Alois P. Heinz_, Oct 07 2009