How to derive these general formulae for number of stereoisomers of a compound with a possible plane of symmetry?
I managed to crack the formula for optical isomers with odd chiral centers, so I'll share my attempt here. Hopefully others may innovate on it and post solutions for other formulae.

Pseudo-chiral carbon atoms - an introduction
The Gold Book defines pseudo-chiral/pseudo-asymmetric carbon atom as:

a tetrahedrally coordinated carbon atom bonded to four different entities, two and only two of which have the same constitution but opposite chirality sense.

This implies that, in your case:

If chiral carbons 2 and 4 both have configuration R (or both S), then the central carbon 3 will be achiral/symmetric, because now &quot;two and only two of its groups which have the same constitution&quot; will have the same chirality sense instead. (Your approach by &quot;plane of symmetry&quot; is wrong. Find more details on this question)
Hence, there can be two stereoisomers (r and s) possible on the 3rd carbon due to its pesudochirality. But, there will be only one if both substituents on left and right have the same optical configurations.

Building up an intuition by manual counting
For optical isomers with odd number of chiral centers and similar ends, you can guess that, if there are $n$ chiral centers, then the middle ($\frac{n+1}2$-th) carbon atom will be pseudo-chiral. To build up an intuition, we'll manually count optical isomers for $n=3$ and $n=5$:
Case $n=3$
Take the example of pentane-2,3,4-triol itself. We find four (=$2^{n-1}$) isomers:
$$
\begin{array}{|c|c|c|}\hline
\text{C2}&amp;\text{C3}&amp;\text{C4}\\\hline
R&amp;-&amp;R\\\hline
S&amp;-&amp;S\\\hline
R&amp;S&amp;R\\\hline
R&amp;S&amp;S\\\hline
\end{array}
$$
As expected from the relevant formula, we find that the first two ($=2^\frac{n-1}2$) are meso compounds, and the remaining two ($=2^{n-1}-2^\frac{n-1}2$) are enantiomers.
Case $n=5$
Take the example of heptane-2,3,4,5,6-pentol:

We expect $16~(=2^{n-1})$ isomers, with the C4 carbon being pseudo-chiral. To avoid a really large table, we observe that the number of meso isomers is easily countable (&lt;&lt; number of enantiomers). Here is a table of those four (=$2^\frac{n-1}2$) meso isomers:
$$
\begin{array}{|c|c|c|c|c|c|}\hline
\text{C2}&amp;\text{C3}&amp;\text{C4}&amp;\text{C5}&amp;\text{C6}\\\hline
R&amp;R&amp;-&amp;R&amp;R\\\hline
R&amp;S&amp;-&amp;S&amp;R\\\hline
S&amp;R&amp;-&amp;R&amp;S\\\hline
S&amp;S&amp;-&amp;S&amp;S\\\hline
\end{array}
$$
Note that the total optical isomers are given by $2^{n-1}$ isomers (more on that below). Hence, the number of enantiomers is easily $12(=2^{n-1}-2^\frac{n-1}2)$.

A formula for the number of meso isomers
As you must have observed from the table, the sequence of optical configurations, when read from the fourth carbon atom, is exactly the same towards both left and right. In other words, if we fix an arbitrary permutation for the optical configurations of the carbon atoms on the left (say RSS), then we will get only one unique permutation of the optical configurations on the right (SSR).
We know that each carbon on the left has two choices (R or S), and there are $\frac{n-1}{2}$ carbon atoms on the left. Hence, the total number of permutations will be $2\times2\times2\cdots\frac{n-1}{2}\text{ times}=2^\frac{n-1}{2}$.
Since, our description (&quot;the sequence of optical configurations, when read from the fourth carbon atom, is exactly the same on both left and right&quot;) describes meso isomers, we have hence counted the number of meso isomers, which is $2^\frac{n-1}{2}$.

A formula for the number of total isomers
We note that there are $n$ chiral carbons (including that pseudo chiral carbon). Again, each chiral carbon has $2$ choices. Hence, the maximum possible number of optical isomers is $2\times2\times2\cdots n\text{ times}=2^n$. This is the maximum possible, not the actual total number of isomers, which is much lower.
The reduction in number of isomers is because the string of optical configurations reads exactly the same from either terminal carbon. Example: RSsRS is the same as SRsSR. This happens because the compound has &quot;similar ends&quot;
Hence, each permutation has been over counted exactly twice. Thus, the actual total number of isomers is half of the maximum possible, and is  $=\frac{2^n}2=2^{n-1}$.

Conclusion
Hence, we have derived that, if 'n' (number of chiral centers) is odd for a compound with similar ends, then:

$\text{Number of meso isomers} = 2^{(n-1)/2}$
$\text{Total number of optical isomers} = 2^{n-1}$
$\text{Number of enantiomers} = 2^{n-1}-2^{(n-1)/2}$