Listing 1

(a)

X Modify = 1
X Count  = 16
Y Modify = N-15 (offset from the end of one row to the start of another)
Y Count =  8 

(b)

0,1,2,...15, 
N,N+1, ... N+15, 
2N, 2N+1,... 2N+15, ...
7N, 7N+1,... 7N+15, 
0, ...