%I
%S 1,4,9,25,49,8,6,121,15,77,35,169,16,221,10,12,187,21,209,27,91,65,
%T 361,20,289,32,55,18,14,33,161,39,133,299,119,95,85,247,34,125,22,45,
%U 44,69,26,24,203,81,217,323,259,377,155,287,51,115,143,38,145,36,205,46,57,52
%N Triangle T(j,k) for 1 <= k <= j is filled row by row in the following manner: T(1,1) = 1; T(j,k) is the smallest nonprime number not yet used which is coprime to its left, left upper, upper and right upper neighbor, provided that such a neighbor exists (i.e., belongs to the triangle). Sequence contains the triangle by rows.
%C This results in a triangle, where each element is coprime to all of its (at most eight) neighbors.
%C A rearrangement of nonprimes.
%e The first few rows of the triangle are
%e 1;
%e 4, 9;
%e 25, 49, 8;
%e 6, 121, 15, 77;
%e 35, 169, 16, 221, 10;
%e 12, 187, 21, 209, 27, 91;
%e T(4,2) = 121 is coprime to its neighbors 25, 49, 8, 6, 15, 35, 169 and 16.
%o (PARI) {unused(m,T,j,k)=b=1; for(jj=1,j1, for(kk=1,jj,if(T[jj,kk]==m,b=0))); for(kk=1,k1,if(T[j,kk]==m,b=0)); b}
%o (PARI) {nextnum(T,j,k)=t=1; m=4; while(t>0,if(!isprime(m)&&unused(m,T,j,k)&&if(k>1,gcd(m,T[j1,k1])==1,1)&&if(k<j,gcd(m,T[j1,k]),1)==1&&if(k<j1,gcd(m,T[j1,k+1])==1,1)&&if(k>1,gcd(m,T[j,k1])==1,1),t=0,m++)); m}
%o (PARI) {n=50; T=matrix(n,n); T[1,1]=1; for(j=2,n, for(k=1,j,print1(T[j,k]=nextnum(T,j,k),","))); for(j=1,n, for(k=1,j,print1(T[j,k],",")))}
%Y Cf. A082201, A082202, A082203.
%K nonn,tabl
%O 1,2
%A _Amarnath Murthy_, Apr 07 2003
%E Edited, corrected and extended by _Klaus Brockhaus_, May 14 2003
