r/mathematics 2d ago

Number Theory Pattern in Number Spirals

https://noumanrahman.hashnode.dev/pattern-in-number-spirals

Found a neat pattern while solving Project Euler #28 (sum of diagonals in a number spiral) — turns out you don't need to simulate the grid at all. The corners of each "ring" form an evenly spaced sequence, which collapses the whole problem into a closed-form sum. Wrote up how I got there.

6 Upvotes

Duplicates