def matrix(m,n): if m==1: return n+1 elif n==1: return m+1 else: return matrix(m,n-1)+matrix(m-1,n)
def waynum(n): listy=[i for i in xrange(1,n+2)] for i in xrange(1,n): for j in xrange(1,n+1): listy[j]=listy[j-1]+listy[j] print listy[n] >>> waynum(3) 20 >>> waynum(2) 6 >>> waynum(20) 137846528820