Curly braces with subscript and superscript

bracketssubscriptssuperscripts

I'm looking for a way to write something like this:

\lbrace A_i\rbrace _{i = 1}^{n}

My goal is to put a subscript and a superscript near the right curly brace. How can I do it? The subscript and the superscript should be below and above the ends of the right curly brace.

Best Answer

The subscript and the superscript should be below and [above] the ends of the right curly brace.

Something like this?

enter image description here

\documentclass{article}
\usepackage{amsmath} % for "\overunderset" macro
\begin{document}
$
\overunderset{n}{i=1}{\rbrace}     \quad
\overunderset{n}{i=1}{\big\rbrace} \quad
\overunderset{n}{i=1}{\Big\rbrace} \quad
\overunderset{n}{i=1}{\bigg\rbrace}\quad
\overunderset{n}{i=1}{\Bigg\rbrace}
$
\end{document}