TransWikia.com

Typing sequences recursively in Overleaf

TeX - LaTeX Asked by Malgetrica on March 25, 2021

I’m trying to type the following sequence recursively on Overleaf but I’m not exactly sure how to format it exactly as it is shown below. More specifically, I need help on how to type the info past the left brace.

enter image description here

One Answer

You can define a new type of cases using mathtools:

documentclass{article}
usepackage{mathtools}

makeatletter
newcases{centercases}{quad}
  {hfil$m@thdisplaystyle{##}$hfil}
  {$m@thdisplaystyle{##}$hfil}{lbrace}{.}
makeatother

begin{document}

[
a_{n}=
begin{centercases}
  1         & n=1 
  a_{n-1}+4 & n>1
end{centercases}
]

end{document}

enter image description here

However, the output obtained with cases is more frequently used:

enter image description here

Correct answer by egreg on March 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP