clear all
clc 

n=25; 

A=eye(125); 

for i=2:125
        for j=2:125
                A(i,1) = 1; A(1,j) = 1;
                A(i,j) = A(i-1, j) + A(i, j-1);        
                A(i,j) = A(i,j) - n*floor(A(i,j)/n);
        end
end



