This question might be a little off-topic for Math Meta—you are likely to get a better response from tex.se. However, since typesetting is often an issue on the main Math SE site, I suppose that this question is also in-scope here.
Don't use \choose
. The \choose
command is a plain TeX command, and is not really appropriate for use in LaTeX. Instead, use the \binom
command provided by the amsmath package: $\binom{n}{k}$
is typeset as $\binom{n}{k}$.
Don't use \div
(unless you are writing up a document for elementary school children. The obelus is almost never used in mathematical writing, except when teaching children. Because the obelus is uncommon, it is going to take most folk a minute to parse an expression which uses it. Moreover, it can be easily confused with a plus sign. Better to use a slash (i.e. $a/b$ is superior to $a\div b$).
Use display style mathematics. This can be done by either explicitly using the \displaystyle
command (in the cases environment, this needs to be done in each entry), or by using a few specific commands producing, e.g., display fractions or binomial terms—commands like \dfrac
and \dbinom
force display style mathematics, even in cases where it would normally not be displayed (note that there are inline equivalents: \textstyle
, \tfrac
, \tbinom
, etc).
Extra vertical space can be added between lines by adding a bit of stretch in square braces after the end-of-line. For example (as was done in the question above), \\[2ex]
will add about two lowercase 'x'es of space between the current line and the next line. Personally, I think that [2ex]
creates a little too much space, but that is largely a matter of style, and is between the author and their editor(s).
As a matter of personal preference, I think that it is sometimes a good idea to put a little bit of extra space after a comma in math mode (particularly when the mathematics is behaving more like text than mathematics). There are various commands for adding space, e.g. \,
or \
. I think that a little bit of extra space makes sense on the right-hand side of the cases environment (where the conditions are, essentially, text), and might help readability in the sort of generalized binomial coefficient notation being used here.
Using the above, the expression in the original question can be typeset as
$$
\text{no. palindromes} = \begin{cases}
\dbinom{n/2}{(n-k)/2,\ k/2}, & n=2x,\, k=2y \\[1ex]
\dbinom{\lfloor n/2 \rfloor}{(n-1-k)/2,\, k/2}, & n=2x+1,\ k=2y \\[1ex]
\dbinom{\lfloor n/2 \rfloor}{(n-2-k)/2,\, k/2}, & n=2x+1,\ k=2y+1 \\[1ex]
0, & n=2x,\ k=2y+1
\end{cases}
$$
which renders as
$$
\text{no. palindromes} = \begin{cases}
\dbinom{n/2}{(n-k)/2,\ k/2}, & n=2x,\, k=2y \\[1ex]
\dbinom{\lfloor n/2 \rfloor}{(n-1-k)/2,\, k/2}, & n=2x+1,\ k=2y \\[1ex]
\dbinom{\lfloor n/2 \rfloor}{(n-2-k)/2,\, k/2}, & n=2x+1,\ k=2y+1 \\[1ex]
0, & n=2x,\ k=2y+1
\end{cases}
$$
\displaystyle
before each line in the cases. Not sure it will show up in a comment, but $$\text{No. palindromes} = \begin{cases} \displaystyle {n \div 2 \choose (n-k) \div 2, k \div 2}, & n = 2x, k = 2y \\[2ex] \displaystyle {\lfloor n \div 2 \rfloor\choose (n-1 -k) \div 2, k \div 2}, & n = 2x +1, k = 2y \\[2ex] \displaystyle {\lfloor n \div 2 \rfloor \choose (n-2 -k) \div 2, k \div 2}, & n = 2x +1, k = 2y + 1 \\[2ex] \displaystyle 0, & n =2x, k = 2y +1 \end{cases}\, .$$ As an aside, I would strongly recommend using / instead of \div. $\endgroup$\dbinom
for the binomial coefficients gives a similar (or maybe even the same) result as the solution suggested in the first comment: $$\text{No. palindromes} = \begin{cases} {\dbinom{n \div 2}{(n-k) \div 2, k \div 2}}, & n = 2x, k = 2y \\[2ex] {\dbinom{\lfloor n \div 2 \rfloor}{(n-1 -k) \div 2, k \div 2}}, & n = 2x +1, k = 2y \\[2ex] {\dbinom{\lfloor n \div 2 \rfloor}{(n-2 -k) \div 2, k \div 2}}, & n = 2x +1, k = 2y + 1 \\[2ex] 0, & n =2x, k = 2y +1 \end{cases}$$ $\endgroup$\dbinom
literally is\displaystyle\binom
, as you suggest. $\endgroup$\displaystayle
. Using\dbinom
we're sure that we have only changed one particular binomial coefficient. $\endgroup$