A(i,j)=3^i * 7^j when i != 0 and j != 0: A(i,j)=A(i-1,j-1)*21 when i!=0 and j==0: A(i,0)=A(i-1,0)*3 when i==0 and j!=0: A(0,j)=A(0,j-1)*7 when i==0 and j==0: A(0,0)=1
You can store them in a two-dimensional array so that you can get the same value from it.
source share