Vector path length of a hypotenuse
Solution 1:
I was just about to ask the exact same question (although phrased differently), but in the process of asking it, I figured it out:
Basically the point is no matter how small each of the smaller zigzag steps' edges get, you can draw a line across it that represents its hypotenuse. If you sum all of those together, you'll always get the original length ($\sqrt{2}$).
It is very counterintuitive, though. The question came to me while driving a grid—am I better off wiggling left and right repeatedly to stay closest to the diagonal (apparently the shortest distance between two points), or driving down the outside edges of the grid? Some mental arithmetic showed that the distance travelled (presuming all corners are perpendicular) should be identical no matter how many times I turn (provided I don't double-back on myself):
A B C
┌──────────────────┬──────────────────┐
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│D │E │F
├──────────────────┼──────────────────┤
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│G │H │I
└──────────────────┴──────────────────┘
To travel from point $A$ to $I$, the distance of driving $AG + GI$ is the same as $AD + DE + EH + HI$ (since $AD + EH = AG$ and $DE + HI = GI$).
All that's not so hard to grasp, but when you do this same task recursively on each grid square (as you describe), you quickly end up producing something that closely approximates half the box, but somehow has the same perimeter as the starting square:
This went beyond counterintuitive to me and became downright unacceptable to my brain. If you treat the square as a unit square (as you have), both of these shapes have a perimeter of 4, but the real triangle formed by joining the two diagonal corners has a perimeter of $2 + \sqrt{2}$ (less than 3.5!). At some amount of resolution, those zig zags are going to become visually indistinguishable from a straight diagonal line, but somehow there's more than half an edge length extra hiding somewhere.
The solution though, as described above is simple: no matter how large $n$ gets, you can always imagine zooming right in to that "triangle", and you do indeed end up with a series of zigzags, never a diagonal line. And if you calculate the sum of all those little zigzags' hypotenuses (that is, $\frac{n}{2} \times w\sqrt{2}$), you'll end up with the hypotenuse of the larger triangle ($\sqrt{2}$, since $\frac{n}{2} \times w = 1$ as you stated).
Solution 2:
The length of the $n$ path is define by : $ \int_{(a,b)} \gamma_n'(t)dt $ where $\gamma_n$ is your path. But you can't pass at the infinity because "you have too much point of discontinuity". For instance you have no simple convergence for $\gamma'_n$...