I'm not a mathematician. I'm trying to solve a difficult archived programming problem from Project Euler. I don't necessarily want to link it, because sharing exact solutions to problems is against PE site rules and I don't want anyone here to go too far solving the problem in a response, nor do I want someone to be able to find the answer by googling the problem. The question I'm asking here is just one intermediate step and is sufficiently general that it's within the spirit of the PE site to ask for help with it. If you really want to know the exact problem you probably can find it without too much work, or you can give me your email and I'll send it to you.
Basically my question is exactly as stated in the title. I have to imagine there's a well-known mathematical result that gives the solution, but I can't seem to find it. Ideally I'd also like to develop some intuition for how to find this answer myself.
Relevant info given in the problem description:
Let's say you have a square with side lengths of 500 meters. The area:perimeter ratio of this square is $125$ (this is what we're trying to maximize). The inscribed circle ($r = 250$) has the same ratio. If you cut from each corner of the square an isosceles triangle of sides $75, 75, 75 \sqrt{2}$, the resulting inscribed shape has an area:perimeter ratio of ~$130.87$.
Info from my work on the problem so far:
-A regular inscribed octagon has a ratio of $125$. Maybe this result can be generalized to any regular inscribed shape symmetric about both axes with >4 sides?
-An inscribed squircle of definition $x^4 + y^4 = r^4$, ($r = 250$), has a ratio of about $132.1$. None of my attempts at a solution based on this shape have worked, though, so I'm thinking this is not the optimal shape.