Sample size and conservative confidence interval 
We want to produce a $90%$ confidence interval for the proportion of
  vegetarian recipes at one cookbook. We will use simple random sampling
  without replacement to select a sample of $2311$ recipes in the book.
  We want the interval length is at most $0.06$. Find the minimum sample
  size so we can build the interval.

We have that confidence interval for proportion is
$$\overline{Y}-z_\frac{\alpha}{2}\sqrt{(1-f)\frac{\hat{P}(1-\hat{P})}{n-1}}\leq\mu\leq \overline{Y}+z_\frac{\alpha}{2}\sqrt{(1-f)\frac{\hat{P}(1-\hat{P})}{n-1}}$$
where $f=\frac{n}{N}$, $n$ is the size of the sample and $N=2311$ is the size of population, but since we don't know the values of $\hat{P}$, I did a conservative confidence interval, replacing
$$\hat{P}(1-\hat{P})\Rightarrow \frac{1}{4}$$
so the interval is
$$\overline{Y}-z_\frac{\alpha}{2}\sqrt{\frac{(1-f)}{4(n-1)}}\leq\mu\leq \overline{Y}+z_\frac{\alpha}{2}\sqrt{\frac{(1-f)}{4(n-1)}}$$
then the length is
$$2z_\frac{\alpha}{2}\sqrt{\frac{(1-f)}{4(n-1)}}=0.06$$
$$2z_\frac{\alpha}{2}\sqrt{\frac{(1-\frac{n}{N})}{4(n-1)}}=0.06$$
$$2*1.64\sqrt{\frac{(1-\frac{n}{N})}{4(n-1)}}=0.06$$
but I could not solve this equation, and also not sure if this is indeed the correct reasoning.
 A: This is a surprisingly hard question if I have interpreted it correctly and an exact answer is required.  I apologise in advance if what follows is largely incomprehensible.
Let me check the facts first.  There are $N=2311$ recipes, some unknown number $V$ of which are vegetarian.  You will sample $n$ recipes without replacement and want to know the smallest $n$ you can use such that there's a $90\%$ confidence interval of width at most $0.06N$ for $V$.  Each CI will be a pair of integers, $(a,b)$, such that $b-a\le\lfloor 0.06N\rfloor=138$.  Yes?
OK, let $P(N,V,n,v)=\binom{V}{v}\binom{N-V}{n-v}/\binom{N}{n}$ be the probability that $n$ samples yield $v$ veggie recipes: call that an $(n,v)$ outcome.  Let $I(N,V,n,v)$ be $1$ if the CI from an $(n,v)$ outcome contains $V$; or $0$ otherwise.  Let $C(N,V,n)=\sum_v P(N,V,n,v) \times I(N,V,n,v)$, the "coverage" of $V$, or the probability that the CI from an $(n,\cdot)$ outcome contains $V$.  For $90\%$ confidence, we need $C(N,V,n)\ge 0.9$ for all $V\in{0,1,2,\ldots,N}$.  So, what's the smallest $n$ such that it's possible to construct CIs meeting that coverage threshold?
We will try each $n=1,2,3,\ldots$ in turn until we find one that works.  To check a given $n$, we use a greedy algorithm.  Initially, there are no CIs and the coverage is $0$ for all $V$.  Set the CI $(0,\ldots,138)$ for $(n,0)$.  This gives $100\%$ coverage for $V=0$, but lesser coverage for larger $V$.  Find the smallest $V$ with coverage less than $90\%$: start the CI for $(n,1)$ at that point.  Repeat, starting CIs for $(n,2), (n,3)$, etc at those $V$ that are not yet $90\%$ covered.  You'll either make it right to the end, $V=N$, or run out of CIs.  If you make it, $n$ is good; otherwise $n$ is bad.
This algorithm finds the minimal number of samples, $n=546$.
It's quite a thing to see what coverage you get out of this algorithm; see below.

