Bayesian sample size estimation for given HPD

If this is the aim, you can model sample size “n” as a parameter of a linear model: observed_accuracy = f(sample size “n”). It will need data input as pair of {sample size, accuracy}. And you just place prior on “n” and maybe also the intercept of the linear model.