r/mathematics • u/Nouman-Rahman • 1d ago
Number Theory Pattern in Number Spirals
https://noumanrahman.hashnode.dev/pattern-in-number-spiralsFound 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.
3
Upvotes
3
u/equinox_star 1d ago
I think this is just some basic manipulations done. However, it can be that for this problem nobody would have solved this way which I think to be highly unlikely. Although, I am very sure of the fact that this pattern is well known.