This is LaTeX code:
[latex]
a = \frac{4(17n-29)}{n-4}, \quad d = -\frac{26}{n-4}, \quad n \neq 4
[/latex]