Possible for $a_n=n$. We have covered some subset of an mxm square, are situated at the boundary, and want to visit a cell (x,y) in our square. Choose one of the x,y axes and move far away along it, (but not upon it), until stepsize s>>m and distance is some d from the axis. Then take either 1,2, or 4 more steps along the axis. Then alternately move away, and towards the axis, 2*d steps, until we land on it. Then by moving away and towards (x,y), n times, we can reach every point of the form j-1-3n on the axis, by just moving one more step towards (x,y) where j is our current coordinate, which we could shift to anything modulo 3 when we chose one of the 1,2,4 steps. And if 3n-n>m, we dont use any other squares within the the mxm square, to visit (x,y), and emerge on the opposit side. And since s>>m, if we take one more step we are at a boundary of a new square. WLOG suppose we are at $(0,0)$, with stepsize $s(0)$, and want to visit $(x,y)$, $0<x<m$, $0<y<m$. The full path we take consist of these moves. We move south for $k$ steps, then alternate west,east, x times, now we are at $(x,-k)$ with stepsize $s(k+2x)$. Then we alternate south, east, n times, now we are at $(x,n-k)$ with stepsize $s(k+2x+2n)$, select n and k such that $y=s(k+2x+2n)+n-k$ and $s(k+2x+2n)>m$. Then take two steps north, we are now at $(x,y+s(k+2x+2n)+1)$. move north,east until you are a corner of a new square bounding all visited squares. PS. I asked a question about the less trivial 1-D version here: http://math.stackexchange.com/questions/111377/self-avoiding-walk-on-mathbbz