There are many models to represent colors with numbers, the most widely known one is RGB where you have a color represented by its values for RED, GREEN and BLUE from 0 to 255
There's also CMYK (cyan, magenta, yellow, black), HSL (hue/saturation/lightness), HSB (hue/saturation/brightness)
These models are very useful in general, but they have the drawback ...
I'm not a mathematician so I can't answer that part of your question, however these are not a hundred miles away from simple step blends made in Illustrator (or similar vector software) from three basic colours:- 1 light, 1 bright saturated/mid toned, and 1 darker. You could literally do this with any three colours.