A dynamic fog Sudoku exploring Fermat's theorem on the sum of two squares
Fermat's "Sum of Two Squares" theorem states that any odd prime number, p, can be written as the sum of the squares of two integers, A and B:
p = A² + B²
if and only if p ≡ 1 (mod 4).
This means that when divided by 4, p has a remainder of 1 (for example, if p = 13, then 13 ÷ 4 = 3 with remainder 1).
Normal Sudoku rules apply.
Have Fun Solving!
Solution code: Column 1, top to bottom.
on 10. April 2026, 21:17 by Neonesque
I love a good mathematical theorem.
on 25. March 2026, 22:39 by MattJones
Coo idea, some nice logic in there. Good fun!
on 19. March 2026, 21:36 by dzamie
That was a lot of fun! I admittedly kept worrying that I might run into a 3-digit number at some point, and only after the puzzle was over did I check to see that that would've been impossible (only 117 is reachable with single-digit squares, and 1 can't be orthogonally next to itself).
I would recommend, as a personal preference, that you not reveal the entire rest of the board in one go. Going from a lot of grey fog cells to instantly all white cells kinda flashbanged me for a moment.
on 17. March 2026, 20:38 by Cassinii
Fingers crossed
on 17. March 2026, 20:34 by Cassinii
Trying to centre the "p = A^2 + B^2" text
on 17. March 2026, 19:56 by Cassinii
Hopefully last one
on 17. March 2026, 19:52 by Cassinii
More HTML testing, sorry about the comment spam :(
on 17. March 2026, 19:47 by Cassinii
Trying to move the link!
on 17. March 2026, 19:38 by Cassinii
Testing stuff :)
on 17. March 2026, 16:05 by Prepared Jester
Very nice puzzle! I did have to grab pen and paper for a little help lol
on 17. March 2026, 14:13 by Rab3aron
Very beautiful puzzle!
on 17. March 2026, 11:38 by Cassinii
Please ignore these, I'm not changing anything!
on 17. March 2026, 11:36 by Cassinii
small changes
on 17. March 2026, 11:29 by Cassinii
text change
on 17. March 2026, 11:27 by Cassinii
Added link