I have $2$ questions about notation.
Question 1.
Suppose, numbers are as follows.
$\left\{3\right\}\longrightarrow7$
$\left\{3,6\right\}\longrightarrow9$
$\left\{3,6,7\right\}\longrightarrow11$
$\left\{3,6,7,5\right\}\longrightarrow15$
$...............$
$\left\{p_1,p_2,p_3,...p_n\right\}\longrightarrow q_n$
And $p_1,p_2,...,p_{n}$ are arbitrary natural numbers.But, the value $q_n$ depend on the values of ${p_1,p_2,...,p_n}.$
I want to write a notation.
I think, I can write, for example,
$$f(p_1,p_2,...p_n)=q_n$$ like a function.Is it correct or ıs there an other notation?
Question 2.
Which notation is correct?
$\sum_{n=1}^{k} 2^{n}× n^2$ or $\sum_{n=1}^{k} (2^{n}× n^2)$
and
$\sum_{n=1}^{k} 2^{n}+n^2$ or $\sum_{n=1}^{k} (2^{n}+n^2)$
This implies that \begin{align*} \color{blue}{\sum_{n=1}^k 2^n}+n^2&=\color{blue}{\sum_{n=1}^k \left(2^n\right)}+n^2=\color{blue}{\left(\sum_{n=1}^k 2^n\right)}+n^2\\ &=\color{blue}{2^1+2^2+\cdots+2^k}+n^2 \end{align*} The scope of the Sigma symbol does not extend to $n^2$, which is a variable by its own independent of the index $n$ (and a bad naming style).
On the other hand according to the arithmetic precedence rules we have \begin{align*} \sum_{n=1}^k \left(2^n+n^2\right)&=(2^1+1^2)+(2^2+2^2)\cdots (2^k+k^2)\\ &=2^1+2^2+\cdots+2^k+1^2+2^2+\cdots+k^2\\ &=\sum_{n=1}^k 2^n +\sum_{n=1}^k n^2 \end{align*}
Since multiplication has higher precedence level than addition we obtain \begin{align*} \sum_{n=1}^k2^n\cdot n^2&=\sum_{n=1}^k\left(2^n\cdot n^2\right) =2^1\cdot1^2+2^2\cdot 2^2+\cdots 2^k\cdot k^2 \end{align*}