One approach is to notice - after some trial and error - that the number of paths at each node is represented by the equivalent entry in Pascal's triangle. So in general for a NxN grid one would construct Pascal's triangle up to height 2N and take the entry in the center position of the last row.