My concern here is the mathematical symbols for sequences and sets.
For a sequence $S =(s_1,\cdots,s_n)$, is it correct to write $s_x \in S$ when I want to check if element $s_x$ is an element in the sequence $S$. Also, when adding a new element to a sequence, is it correct to write $S = S \cup s_x$
Note that a sequence $\{s_n\}$ is a function whose domain is the set of natural numbers
$ s_n$ is the value assigned to $n$ If you add a term to the sequence you change the function so you have to define the new function.
Adding a new term to the sequence is fine as long as you redefine your sequence.