Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #21 Apr 07 2020 10:56:35
%S 1,2,7,6,23,10,21,20,33,28,51,44,87,56,117,80,153,100,201,110,243,140,
%T 291,164,327,188,387,218,405,248,483,284,555,322,633,340,711,392,783,
%U 430,861,460,951,520,1029,550,1137,616,1251,664,1335,718,1365,778,1551
%N First row of square array A082025.
%H Alois P. Heinz, <a href="/A082187/b082187.txt">Table of n, a(n) for n = 1..200</a>
%p b:= proc(t) option remember; 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(1,k), k=1..60); # _Alois P. Heinz_, Oct 07 2009
%t dmax = 55 (* number of antidiagonals *);
%t a[1, 1] = 1; used = {1}; a[_, _] = 1;
%t loop := For[i = d - j + 1; k = 1, True, k++, If[FreeQ[used, k] && AllTrue[ {a[i - 1, j + 1], a[i - 1, j], a[i - 1, j - 1], a[i, j - 1], a[i + 1, j - 1]}, CoprimeQ[k, #]&], AppendTo[used, k]; a[i, j] = k; Break[]]];
%t Do[If[EvenQ[d], Do[loop, {j, d, 1, -1}], Do[loop, {j, 1, d}]], {d, 2, dmax}];
%t Table[a[1, k], {k, 1, dmax}] (* _Jean-François Alcover_, Apr 07 2020 *)
%Y Cf. A082025, A082188, A082189, A082190.
%K nonn
%O 1,2
%A _Amarnath Murthy_, Apr 07 2003
%E More terms from _R. J. Mathar_, May 06 2006
%E Edited with further terms by _Alois P. Heinz_, Oct 07 2009