How many permutations of 160 outputs from binomial B(1, p) if p varies? I apologise for the question title if it's not accurate.  I've spent a long time trying to formulate this.  Let me try to explain by example...
Assume a binomial distribution like B(1, p) where there is a binary choice of 1 or 0 as output, and p is the probability of the output being 1.  Now assume we generate 160 outputs. This is my question: I'm interested in how many permutations (order matters) of the 160 output numbers there are in a general case where p can vary.
So for B(1, 0.5) on average, we can have 160!/(80! * 80!) permutations of ones and zeros which is ~ 10^47. I get this formula from https://math.stackexchange.com/a/452/394771.
What would the mean number of permutations be for 160 outputs from the general case of B(1, p) if p is a variable and not equal to 0.5?
Another example:
Take p = 0.1, and get 160 outcomes from distribution B(1, 0.1).  On the average, you'll get 16 ones, and therefore the mean number of unique permutations is 160! / (16! x 144!) or 4.1^21.  What's the general formula for any p?  My formula collapses for long decimal values of p where the binomial mean isn't an integer such as p = 0.557, giving a mean of 89.12.  The factorial of 89.12 is tricky for me.
I feel exactly what I want but can't express it clearly, so please bear with me.  I'm only an engineer :-(
 A: OK, I think I finally understand the problem.
If you draw a sample of $160$ independent random numbers, where the probability of drawing a one is $p$ and the probability of drawing a zero is $1-p$, then the probability that you will have $k$ ones (hence $160-k$ zeroes) in the sample is $\binom{160}{k} p^k (1-p)^{160-k}$.  The number of possible sequences of $k$ ones and $160-k$ zeroes is $\binom{160}{k}$.  So the expected number of possible sequences of length $160$ which could be generated by permuting the original $160$ numbers is
$$\sum_{k=0}^{160} \binom{160}{k}^2 p^k (1-p)^{160-k}$$
Maybe this expression can be simplified, but I don't see how right now.
A: 
Take p = 0.1, and get 160 outcomes from distribution B(1, 0.1). On the average, you'll get 16 ones, and therefore the mean number of unique permutations is 160! / (16! x 144!) or 4.1^21. What's the general formula for any p? 

Let $(X_1,...,X_n)$ be the sequence of $n$ independent random variables, each distributed as $\text{Binomial}(1,p),$ and let $S_n=X_1+...+X_n$ (which equals the number of $1$s in the sequence). 
Let $A_n$ be the number of different ways in which to arrange the random binary sequence $(X_1,...,X_n)$. (In combinatorics these are called arrangements, whereas the term permutations refers to sequences all of whose elements are distinct.) This is given by the following binomial coefficient: 
$$A_n = \binom{n}{S_n}.$$
We may now consider the expected value of $A_n$:
$$\begin{align}E[A_n]&=E\,\binom{n}{S_n}\\[2ex]
&=\sum_\limits{k=0}^{n}\,\binom{n}{k}\,P(S_n=k)\\[2ex]
&=\sum_\limits{k=0}^{n}\,\binom{n}{k}\binom{n}{k}p^k(1-p)^{n-k}\\[2ex]
&=\sum_\limits{k=0}^{n}\,\binom{n}{k}^2\,p^k(1-p)^{n-k}\\[2ex]
&= \ _2F_1\left(-n;-n;1;{p\over 1-p}\right)\,(1-p)^n
\end{align}$$
where $_2F_1$ is the ordinary hypergeometric function, which in this case is a polynomial in $p$. (To get this and results below, I used Wolfram Alpha.)
Note that $E[A_n]$, as a function of $p$, is maximized by $p={1\over 2}$:
$$\left\{E[A_n]\right\}_{p={1\over 2}}=2^n{\left(n-{1\over 2}\right)!\over n!\,\sqrt{\pi}}\sim 2^n\sqrt{{1\over n\,\pi}}.$$
NB: Instead of computing the mean number of arrangements, $E[A_n]=E\,\binom{n}{S_n}$, you computed the number of arrangements of a sequence having the mean number of $1$s, i.e., $\binom{n}{E[S_n]}=\binom{n}{np}$, when $np$ is an integer; then you were confused by what to do in case $np$ is not an integer. Although I think $E[A_n]$ is probably the quantity you want to look at, nevertheless the quantity you were using can be naturally extended to non-integers, using the Gamma function:
$$\binom{n}{E[S_n]}=\binom{n}{np}={n!\over (np)!\,(n(1-p))!}$$
where $x!$ is extended to all real $x$ except negative integers, by the definition
$$x!::=\Gamma(x+1).$$
This too is maximized by $p={1\over 2}$, for which its asymptotic behavior differs from before by a factor of $\sqrt{2}$:
$$\left\{\binom{n}{E[S_n]}\right\}_{p={1\over 2}}=\binom{n}{n\over 2}\sim 2^n\sqrt{{2\over n\,\pi}}.
$$
