I'm working on a project and all going swimingly so far until I hit the maths wall.
At the moment we work this out by hand by reverse engineering from a number we already know the answer too (2114) but with each of us working it out slightly different and it taking quite awhile sometimes as none of us are very good with a calculator we always end up if slightly different results. Hence the need for something that works it out. And adding it to our intranet.
Any help working this out would be awesome. thanks.
Rules;
Get Number(gap) Between 590 -> 4500
Work out the sizes of Panel & Infills required to fill this gap with the below rules;
Panels must = odd number
Infills (if required) must = even number & be no more than 1 higher in quantity than Panels
Minumum Size for Panels = 590 Max Size for Panels = 705
Minimum Size for Infills = 75 Max Size for Infills = 175
I don't currently have a formula for an example (because I don't even know where to start) All I've managed to do is some really basic: gap / 705 = a then if a isn't a whole number find the difference and do diff / 75 = b but keep repeating this until i get anywhere near a good size.
I'm not even sure what tags to use.

I'm pretty sure there is no formula for this. You will need an algorithm.
Your problem is related to the typesetting problem for right justifying lines - you need to put some words (your panels) of varying lengths into a fixed length line (your gap) with whitespace (your infills) between words.
There's a lot of literature on this that may help. The search for typography line justification algorithms is a place to start - read about how to do it, not whether to do it.
It's not clear from your question whether you are free to vary the lengths of the panels, or whether they are given with fixed bounded lengths (like words).
You started in a reasonable way, by trying to guess at the (largest?) number of panels that will fit. Then, as you say
If you can make the conditions/requirements a little more formal you could consult a local computer science savvy person for an algorithm, or ask at stackexchange.com
Good luck.