Discussion about this post

User's avatar
JBL's avatar

You don't really need modular arithmetic, do you? If an arithmetic sequence contains m^2 and has common difference d, then it contains (m + kd)^2 for every integer k.

Expand full comment
Eric Snyder's avatar

I didn't see a full solution for the making the rounds, so here is one possible solution:

Every AP has the general form a+nd for n in Z. It follows, then, that *every* AP is equivalent to a single residue class {a} (mod d), assuming a is the minimal positive element.

If (a|d)=1, then {a} contains at least one square. But since the squares are periodic in any modulus, we can be sure that every d'th square is in {a}. That further implies that at least one (and usually two) residue class {b} (mod d) exists such that the squares of all terms inthe AP b+nd are in the AP a+nd.

For a concrete example, 4 is a QR mod 7. One of the modular square roots is clearly 2. So the squares of the terms in 2+7n: 2, 9, 16, 23... *all* have squares that are == 4 (mod 7), which you can easily check.

Meanwhile, 3 is a NR mod 7. Hence 3+7n contains no squares.

Clearly, every residue is either quadratic or non-quadratic, so the two possibilities are the only possibilities.

Expand full comment
14 more comments...

No posts