proposed
approved
proposed
approved
editing
proposed
filter[n_] := Module[{R, i, j, nR, a, b, c}, R = Union@ Table[Mod[i^2, n], {i, 0, n-1}]; nR = Length[R]; For[i = 2, i <= nR, i++, a = R[[i]]; For[j = 1, j <= i-1, j++, b = R[[j]]; c = Mod[-a-b, n]; If[MemberQ[R, c] && c != a && c != b, Return[False]]]]; True];
Select[Range[10000], filter] (* Jean-François Alcover, May 12 2023, after Robert Israel *)
approved
editing
proposed
approved
editing
proposed
Mathematics StackExchange, Stack Exchange, <a href="https://math.stackexchange.com/questions/4490010/sum-of-squares-and-quadratc-residues/4490041">Sum of squares and quadratic residues</a>
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed
a(5) = 6 is in the sequence because the solutions to a^2 + b^2 + c^2 == 0 (mod 6) have (up to permutation) [a^2, b^2, c^2] == [0, 0, 0], [0, 3, 3], [1, 1, 4], or [4, 4, 4], all of which have at least two congruent mod 6.
proposed
editing