paths over a n*n grid
sum of digits