I think it would help to better describe what you are trying to do. Are you just trying to recreate the one-sample z-test sample size formula?

If so, where is your power value in the first equation? Can you reference or send a link to the formula you are trying to use?