random math-y thought: clearly, the first circle that hits any integer points at all is the one with radius 1, which hits the points (1,0), (-1,0), (0,1), and (0,-1). Four points total. A little later on, with radius sqrt(5), you hit eight points: (1,2), (2,1), (-1,2), (2,-1), (1,-2), (-2,1), (-1,-2), and (-2,-1)
What is the sequence of radii rn such that the circle at the origin with radius rn hits more integer points than any origin-centered circle with radius r < rn?
@packbat Exactly! You see why this is a more interesting problem than it initially seems.
@Felthry Oh, it's exactly as interesting as it initially seems! 😄
...wait, is it this function? http://mathworld.wolfram.com/SumofSquaresFunction.html
I was going hunting for lists of numbers that are sums of more squares, and it seems like SquaresR[2, r²] is going to be the function that returns how many intersections there are for the circle of radius r
...doesn't tell us the sequence but connects this to a bunch of other number theory I guess?
@Felthry *nods*
...oh - it's going to relate to numbers which are the sum of two squares multiple ways, isn't it?
so, like, *does some quick checking* 65 = 1²+8² = 4²+7², so radius √65 is going to have sixteen points because it hits both the (1,8) and (4,7) points plus their eight symmetries.
there's weirdness because if the points fall on the diagonal (e.g. 50=1²+7²=5²+5²), then the intersection that falls on the diagonal will only have four symmetries, and additional weirdness because if the initial number is a square then you get an integer radius and an extra four points on the axes...