Look IDK about math, but I know about programming: "stare at it" is bad advice. Give it a minute or two, then get up and go for a walk or go to bed. Let your subconscious stare at it instead; it's actually better at this stuff than you are.
If I'm ever staring at math, I'm absolutely not processing visual information while doing so. It's more that like, I'm staring off into space and thinking and "math on a whiteboard" just happens to be the last thing I was looking at and my face is still pointed that way