How could you solve this problem in an elegant way? A "path" from I to J is a series of "movements" through the squares forming the grid. The movements can only be to the right and down. The VALUE of a path is the SUM of the numbers in the squares.
How many paths from I to J have a VALUE equal to 51?

 A: Note that any path goes through exactly 4 "5" squares. The remaining three numbered squares the path passes through have values in the set $\{10,11,12,13,14,15\}$. The only three (not necessarily distinct) elements of this set that sum to 31 are $10,10,11$. It's pretty easy to see that any paths that go through two "10" squares cannot go through an "11" square, so there are no paths with value 51. 
A: Every path must pass through the $15, 14$ or $13$ squares.
Lets look at this modulo 5.
Suppose you pass though the "3" (remember we are looking at this modulo 5) square.  You must have a partial sum equal to 3 before arriving at the 3 square, in order to be at 1 on the way out. And there are no paths that will do that.
Passing through the "4" square, your partial sum must be "2" before getting to the 14 square, which means that you passed through the 12 square, or two of the 11 squares on the way to 14.
2 paths to check, and the total trip sums to 56.
And if you pass through the 15 square, you must have passed through 1 and only 1 of the 11 squares, and not passed through the 12 square.
3 paths to check, and the total trip sums to 56 in all three cases.
There is no path which sums to 51.
