LaTeX: How to adjust how the Sum symbol turns out

Try

\sum\limits_{k=1}^n k^2

if you want the sum limits to appear above and below the sum sign in an inline equation.


A more general solution to force a formula that is appearing in inline style to appear in display style is to start the formula with a \displaystyle declaration, e.g.

$\displaystyle \sum_{k=1}^n k^2$

This will work for any expression that appears differently in inline and display environments, such as \frac, \int, \lim, etc. You can also control the scope of the \displaystyle command by enclosing the desired expression in braces. For example, if you want the sum in your example formula to appear in display style but not the fractions, you could use

${\displaystyle \sum_{k=1}^n k^2} = 1+4+9+\ldots +n^2 = 
\frac{1}{3}n^3 + \frac{1}{2}n^2 + \frac{1}{6}n$