So I'm trying to find the conditional posterior distributions of n given $\theta$ and x as well as $\theta$ given n and x.
These are my priors (poisson and beta)
\begin{equation*} \begin{aligned} & \pi (n) = \frac{ \mu^{n} e^{-\mu}}{n!} \\ & \pi (\theta) = \frac{1}{B(\alpha, \beta)} \theta^{\alpha-1} (1 - \theta)^{\beta-1} \end{aligned} \end{equation*}
and the likelihood function of the parameters given the data is binomial
\begin{equation*} \begin{aligned} L(n, \theta | x) = {n \choose x} \theta^{x} (1- \theta)^{n-x} \end{aligned} \end{equation*}
This is what I have for the first conditional distribution
\begin{equation*} \begin{aligned} & \pi(n | x, \theta) = \frac{\pi(n) L(n | x, \theta)}{ \int \pi(n) L(n | x,\theta) dn} \\ & \propto \pi(n) L(n | x, \theta) \\ & = \frac{ \mu^{n} e^{-\mu}}{n!} \frac{n!}{(n-x)!x!} \theta^{x} (1- \theta)^{n-x} \\ & \propto \frac{ \mu^{n} e^{-\mu}}{(n-x)!} (1- \theta)^{n-x} \\ & \propto \frac{ \mu^{n} \mu^{-x} e^{-\mu} e^{-(1- \theta)}}{(n-x)!} (1- \theta)^{n-x} \\ & = \frac{ \mu^{n-x} e^{-(\mu(1- \theta)}}{(n-x)!} (1- \theta)^{n-x} \\ & = \frac{ (\mu(1-\theta))^{n-x} e^{-(\mu(1- \theta))}}{(n-x)!} \\ \end{aligned} \end{equation*}
I know it should be in the form of x + Y where Y is a poisson random variable so I'm not sure where I'm going wrong.
For my second conditional distribution I have
\begin{equation*} \begin{aligned} & \pi(\theta | x, n) = \frac{\pi(\theta) L(\theta | x, n)}{ \int \pi(\theta) L(\theta | x,n) d\theta} \\ & \propto \pi(\theta) L(\theta | x, n) \\ & = \frac{1}{B(\alpha, \beta)} \theta^{\alpha-1} (1 - \theta)^{\beta-1} \frac{n!}{(n-x)!x!} \theta^{x} (1- \theta)^{n-x} \\ & \propto \frac{1}{B(\alpha+x, \beta + n - x)} \theta^{\alpha + x -1} (1 - \theta)^{\beta + n - x -1} \end{aligned} \end{equation*}
which I think is right because I know it should be some kind of beta distribution.