Im trying to figure this out. Like you could go one by one optimizing a square pyramid by minimizing its surface area for a given volume. Eventually when you get up to an decagon based right pyramid, it is evident that the pyramid is getting more and more optimal approaching the cone, hence the surface area is getting smaller and smaller.
However what is a faster way to do this? Perhaps making an nth based pyramid model and then differentiating it? I don't how that would exactly play out but its definitely possible.