Square spiral make you giddy?

Consider the rectangular spiral in the image below. It starts from the origin and twirls and twirls forever in an anticlockwise direction along the integer coordinates of the Cartesian coordinate plane.Each point along the spiral is numbered with an integer ZZ as shown in the image below.

What is the value of the integer ZZ at the coordinate (12,22)(12,-22)?

Details and assumptions

As an explicit example ZZ is 1010 for (2,0)(2,0) , 33 for (0,1)(0,1) and 1010 for (2,0)(2,0).

×

Problem Loading...

Note Loading...

Set Loading...