Find a function that gives this sequence: $+1,+1,-1,+1,+1,-1,-1,+1,+1,+1,-1,-1,+1,-1,-1,...$ I start with a string $S_1=1$
then the $(n+1)$-th string is $S_{n+1}=\{ S_n,+1 ,-(S_n)\}$
if $S_j=\{s_1,s_2,s_3,..., s_i\}$ 
then $-(S_j)$ is defined as $-(S_j)=\{-(s_i), -(s_{i-1}),..., -(s_3), -(s_2), -(s_1) \}$

The sequence is 
  $[(+1_1,+1_2,-1_3),+1_4,(+1_5,-1_6,-1_7)],+1_8,[(+1_9,+1_{10},-1_{11}),-1_{12},(+1_{13},-1_{14},-1_{15})],...$

I can't find it on internet.
The properties that I noticed are these:
if $\beta(n)=\beta_n$ is the $n$-th number of the sequence we have that


*

*$\beta(2^n -1)=\beta(M_n)=-1$ where $M_n$ is the $n$-th Mesenenne number

*$\beta(2^n)=+1$

*$\beta(2^n +1)=+1$

*if $2^n \lt j \lt 2^{n+1}$ then $\beta_j=-\beta(2^{n+1}-j)=-\beta(2^n+2^{n+1}-j)$

*and $\forall m\in \Bbb N$
$\beta(2^m+n2^{m+1})= \begin{cases}
 +1,  & \text{if $n$ is even} \\
 -1, & \text{if $n$ is odd }  \\ \end{cases}$
Questions

1 - There is a general formula? Have it a name? 
2 - Is this sequence (and the forumula) usefull in any fields of
  mathematics?

Edit: I made a mistake writing the sequence, now is fixed, and I added how I build the sequence the sequece: 
 A: I assume the sequence is $a_n$ with first six terms beginning with $a_1$ being $1,1,-1,1,-1,-1$, and also $a_{n+6}=a_n.$ Note that the nonzero squares mod $7$ are $1,2,4$, and that this is precisely where in the first six terms we have $a_n=1$.
Based on that we can come up with a formula for $a_n$ in two stages. First, define
$$f(n) = mod(\ [\ mod(n-1,6)+1\ ]^3, \ 7),$$
and note that the sequence $f(1),f(2),...$ is $1,1,6,1,6,6,1,1,6,1,6,6,...$ and repeats mod 6. (The inner mod 6 serves to place $n$ into one of the positions 1 through 6, and the outer mod of the cube mode 7 is from Gauss' lemma that the quadratic character of $a$ mod p is congruent to $a^{(p-1)/2}$ mod p. Since I'm assuming the mod function outputs the least nonnegatative residue, the sequence of $f(n)$ does what is required.
In order to get rid of the 6's and convert them to $-1$, we may finally define
$$a_n=(-1)^{1+f(n)}.$$
ADDED: The OP has now given a different definition of the desired sequence, so the above doesn't match it now. I'll try for a formula for that...
NOTE: Yet another adjustment has been made to the definition.
Here's what I think is happening with the new sequence. The condition that $S_{n+1}=S_n,1,-(S_n)$ where (this is the latest adjustment) $(-S_n)$ is obtained from $S_n$ by reversing its order and changing the signs, may be reformulated by saying that $a(2^n)=1$, (this is where the central 1's wind up), and that, for $1 \le k \le 2^n-1$ we have $a(2^n+k)=-a(2^n-k)$. That may lead to a formula...
EUREKA The sequence is $(-1/n)$ and is the Jacobi or Kronecker symbol. It is in OEIS as sequence number A034947, and at that page is the same method of generation you give, along with the fact that it is a multiplicative function and other information. For example $a(2n)=a(n)$ and $a(4n+1)=1,\ a(4n+3)=-1$. I think the page more than covers formulas for the $n$th term etc.
Computational note:
The computation of $a(n)$ can be done in two steps. First express $n=2^k \cdot u$ where $u$ is odd. (This expression is unique.). Then 
$$a(n)=(-1)^{(u-1)/2}.$$
To put this last another way, if $u=1 \mod 4$ return $+1$, else return $-1$.
Just for fun: Let $lg(x)=\ln(x)/\ln(2)$, the log base 2. Then let $g(x)=ceiling(lg(x)),$ and define $$r(n)=\frac{n}{\gcd(2^{g(n)},n)}.$$
Then $r(n)$ is the $r$ used in the computation of $a(n)=(-1)^{(r-1)/2}.$
A: $\Large{T(n)=(-1)^{\lceil\{\log_2((n-1)\!\!\! \mod\!\! 6\;+\;1)\}\rceil}}$
where $n\in\mathbb N, T(n)$ is the $n$th term, $\{x\}$ denotes the fractional part of $x$, and $\lceil x\rceil$ denotes the smallest integer greater than or equal to $x$.
A: This is a formula for $\beta_n$ (can be proved using induction) which explains the properties you noticed:
$$
\beta_n=
\begin{cases}
\ \ 1 \ \ \  , \text{ if } \operatorname{od}(n)\equiv 1 \pmod 4 \\
\\
-1 \ \ , \text{ if } \operatorname{od}(n)\equiv -1 \pmod 4
\end{cases}
$$
where $\operatorname{od}(n)$ is the odd part of $n$.
A: Edit: 
I understood the recursion after the edits of OP
$S_1=1, S_{n+1}=\{S_n,1,-S_n\}$ would seem to generate
$\{1\},\{1,1,-1\},\{1,1,1,-1;1;1,-1,-1,-1\}$
I hope I am right now!
Older comment:
$S_1=1, S_{n+1}=\{S_n,1,-S_n\}$ would seem to generate 
$\{1\},\{1,1,-1\},\{1,1,1,-1;1;-1,-1,-1,1\}$
