I'm trying to write "T(n/3)" within an align block, but I'm not getting the behavior I expect. When I enter this:
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{align}
T(n) = 3T(\frac{n}{3}) + 2n -3
\end{align}
\end{document}
I get this output from Overleaf:
I didn't get this issue when I used aligns and fracs before in the same document. For example, this one worked just as intended:
\begin{align}
S &= \frac{1}{2} + &\frac{1}{4} + &\frac{2}{8} +&\frac{3}{16} + &\frac{5}{32} + &\frac{8}{64} + &\frac{13}{128} + \dots\\
\frac{1}{2}S &= &\frac{1}{4} + &\frac{1}{8} + &\frac{2}{16} +&\frac{3}{32} + &\frac{5}{64} + &\frac{8}{128} + \dots\\
S-\frac{1}{2}S &= \frac{1}{2}+ &\frac{0}{4} + &\frac{1}{8} + &\frac{1}{16} +&\frac{2}{32} + &\frac{3}{64} + &\frac{5}{128} + \dots\\
&= \frac{1}{2} + \frac{S}{4}\\
&\implies 4S-2S=2+S\\
&\implies S=2
\end{align}
yielding:



\documentclass{...}and ending with\end{document}. – Alessandro Cuttin Oct 04 '19 at 14:56alignis part of theamsmathpackage so you need\usepackage{amsmath}. Also, remove the empty lines inside thealignenvironment. An empty line is a new paragraph, which is not appreciated in mathmode. – StefanH Oct 04 '19 at 17:11\usepackage{amsmath}and skipping errors. Of course, the issue are the blank lines insidealign, that are not allowed and raise low level errors. – egreg Nov 03 '19 at 16:07