A priori power Hansen Hurwitz

I am in a situation where sampling proportional to some weight might be very beneficial. In order to estimate $\tau$ the population total / sum I use the Hansen Hurwitz estimator. That is,

$$\hat{\tau}_p = \frac{1}{n}\sum_{i=1}^n\frac{y_i}{p_i}$$

with variance

$$\hat{Var}(\hat{\tau}_p) = \frac{\frac{1}{n}\sum_{i=1}^n(\frac{y_i}{p_i}-\hat{\tau}_p)^2}{n-1}$$

where $p_i$ are the sampling weights and $y_i$ the observations

How can I estimate my sample size? I have a set of $\hat{y}_i$ values that are extremely well correlated ($r>0.9$) with $y_i$. Normally I would just solve the variance equation for $n$, but I didn't manage to do that. Therefore, I simulated a few million sample draws and some variation around my estimates for $y_i$. However, for some large sample sizes (in my case 55-60) the power drops (from 0.97 to 0.9) and for $n>60$ rises to $1.0$. I am uncomfortable relying on the results with - what I feel are - such strong abnormalities.

Further, the weighting of the elements in the sample frame is very strong ($p_i$ ranging from $0.115$ to $1.9*10^{-6}$). Since I am sampling with replacement I am have several elements being selected multiple times. Up until now I just used a unique() function to get each element once. Does this bias the results?

You should first determine the desired CV. Then you can determine the n needed. It is not necessary to eliminate the duplicate units for the estimation (if the $\hat{y}_{i}$ are highly correlated with the $y_{i}$ is logical that the sample size is very small).