I'm programming an application which will need to calculate and invert 6 variables.

e.g.

[4][20][15][16][0][1] -> (perform calculation) -> 450

450 -> (perform calculation) -> [4][20][15][16][0][1]

What would be the best direction to go to calculate and invert the calculation for these variables or nth variables if I wish to expand later on? I was looking at Matrices, linear equations, etc, but not sure the best and easiest method for programmatically making this a bidirectional equation. Edit: I’m looking to get the smallest number possible, and the range is 0 to 55 for my variables.