OFFSET
1,3
COMMENTS
A geometric interpretation of the sequence is the number of added or subtracted squares along the edge of (not completely within) an origin centered circle in a quadrant of a Cartesian grid as the radius increases. The number of squares increase or decrease when the radius squared changes from being exactly on a corner of a square (r^2 = m^2+n^2) to the open interval between corners given by (m^2+n^2,(m+1)^2+(n+1)^2). The square radii that correspond to corners are given by A001481, so each a(n) corresponds to the radius changing from a point to an element of an open set bounded by adjacent elements of A001481.
a(n) is 0 when the radius squared increases from the open interval less than a perfect square to the perfect square itself (corresponding to a radius that intersects the x and y axes at an integer), see below for example.
a(n) is odd when the square radius changes to or from an integer which is twice a square integer (on a corner on the y= x line), see below for example.
LINKS
Rajan Murthy, Table of n, a(n) for n = 1..4999
EXAMPLE
CROSSREFS
KEYWORD
sign
AUTHOR
Rajan Murthy, Jan 03 2014
STATUS
approved