num_1= input(''); A_out = zeros(num_1,num_1); A_out(1,1) = 1; num_cal = 2; for ii = 2 : num_1 A_out(ii,1) = A_out(ii-1,1)+ii-1; end for ii = 2 : num_1 A_out(1,ii) = A_out(1,ii-1)+ii; end for jj = 2 : num_1-1 for ii = 2 : num_1-1 if (ii + jj) <= (num_1 +1) A_out(ii,jj) = ...