That will be a fairly complicated algorithm!!
There is no direct N1/EPR relationship. There are too many external factors. Pressure, temperature and even humidity will change the EPR for a given N1 speed. The lower the temperature or greater the pressure density, the less N1 will be required to achieve the required EPR.
The MM has reams of correction tables which will give temperature/pressure corrected N1 values but for the N1 to EPR relationship there is still a range of values which are acceptable for maintenance purposes.