由题意设输出数,设C(m,n)为k,则C(1,1)=1,C(m,n)=C(m,n-1)+2,C(m,1)=2(m-1,1).
(1)C(1,n)=C(1,n-1)+2=C(1,n-2)=C(1,n-2)+2×2=…=C(1,1)+2(n-1)=1+2(n-1)=2n-1.
(2)C(m,1)=2(C(m-1,1)=25•C(m-2,1)=…=2m-1C(1,1)=2m-1.
(3)C(m,n)=C(m,n-1)+2=C(m,n-2)+2×2=…=C(m-1)+2(n-1)=22C(m-2,1)+2(n-1)=…=2m-kC(1,1)+2n-2=2m-1+2n-2=2m+2n-3.