Compositeness test using $S_k=2S_{k-1}-3S_{k-2}+2S_{k-3}$ recurrence relation Can you prove or disprove the following claim:

Let $S_k=2S_{k-1}-3S_{k-2}+2S_{k-3}$ with $S_0=0$ , $S_1=1$ , $S_2=1$ . Let $n$ be an odd natural number greater than $2$. Let $\left(\frac{D}{n}\right)$ be the Jacobi symbol where $D$ represents the discriminant of the characteristic polynomial $x^3-2x^2+3x-2$, and let $\delta(n)=n-\left(\frac{D}{n}\right)$ , then:
  $$\text{If } n \text{ is a prime then } S_{\delta(n)} \equiv 0 \pmod{n}$$

You can run this test here. Note that $D=-28$ . 
I have verified this claim for all $n$ up to $200000$ . I was searching for counterexample using the following PARI/GP code:
rec(m,P,Q,R)={s0=0;s1=1;s2=1;l=3;while(l<=m,s=P*s2+Q*s1+R*s0;s0=s1;s1=s2;s2=s;l++);return(s);}
RPT(n1,n2)={forprime(n=n1,n2,d=n-kronecker(-28,n);if(Mod(rec(d,2,-3,2),n)!=0,print(n);break))}

P.S.
Wolfram Alpha gives the following closed form for $S_k$ : $$S_k=\frac{i2^{-k} \cdot \left(\left(1-i\sqrt{7}\right)^k-\left(1+i\sqrt{7}\right)^k\right)}{\sqrt{7}}$$

The roots of $x^3-2x^2+3x-2=0$ are ${1, \frac{1+\sqrt{-7}}{2}, \frac{1-\sqrt{-7}}{2}}$
Let $\alpha = \frac{1+\sqrt{-7}}{2},\quad \beta = \frac{1-\sqrt{-7}}{2}$ 
Thus, the formula can be written as $S_n = A\cdot1^n + B\cdot\alpha^n + C\cdot\beta^n$ with $A,B,C.$
We can determine (A,B,C) using $S_0,S_1,S_2$ below 
$A = \frac{-(\beta-1+\alpha)}{(-1+\beta)(-1+\alpha)}=0$
$B = \frac{\beta}{-\beta+\beta\alpha+\alpha-\alpha^2}=\frac{1}{\sqrt{-7}}$
$C = \frac{-\alpha}{(-\alpha+\beta)(-1+\beta)}=\frac{-1}{\sqrt{-7}}$ 
Hence we get $S_n = \frac{1}{\sqrt{-7}}((\frac{1+\sqrt{-7}}{2})^n-(\frac{1-\sqrt{-7}}{2})^n)$
Let $p$ be an odd prime.
\begin{align}
S_{p+1} &= \frac{1}{\sqrt{-7}} \left(\middle(\frac{1+\sqrt{-7}}{2}\middle)^{p+1}-\middle(\frac{1-\sqrt{-7}}{2}\middle)^{p+1} \right)\\  
&= \frac{1}{2^{p+1}}\frac{1}{\sqrt{-7}} \left(\middle(1+\sqrt{-7}\middle)^{p}\middle(1+\sqrt{-7}\middle)-\middle(1-\sqrt{-7}\middle)^{p}\middle(1-\sqrt{-7}\middle)\right)\\  
\end{align}
Since coefficients $\binom{p}{k}$ with $1\leqq k \leqq p-1$ are divisible by $p$, then we get,
$2^{p}S_{p+1}\equiv(-7)^{\frac{p-1}{2}}+1 \pmod{p}$ 
Using $(-7)^{\frac{p-1}{2}}\equiv ({\frac{-7}{p}}) \pmod{p},$ then  
$2^{p}S_{p+1}\equiv({\frac{-7}{p}})+1 \pmod{p}$ 
Hence if $({\frac{-7}{p}})=-1$ then $S_{p+1} \equiv 0 \pmod{p}$
$$ $$
$$ $$
$$ $$
\begin{align}
S_{p-1} &= \frac{1}{\sqrt{-7}} \left(\middle(\frac{1+\sqrt{-7}}{2}\middle)^{p-1}-\middle(\frac{1-\sqrt{-7}}{2}\middle)^{p-1} \right)\\  
&= \frac{1}{2^{p-1}}\frac{1}{\sqrt{-7}} \left(\middle(1+\sqrt{-7}\middle)^{p}\middle(1+\sqrt{-7}\middle)^{-1}-\middle(1-\sqrt{-7}\middle)^{p}\middle(1-\sqrt{-7}\middle)^{-1}\right)\\  
\end{align}
Since $(1+\sqrt{-7})^{-1}=(1-\sqrt{-7}/8$, $(1-\sqrt{-7})^{-1}=(1+\sqrt{-7}/8$, we get
$2^{p+1}S_{p-1}\equiv(-7)^{\frac{p-1}{2}}-1 \pmod{p}$ 
Using $(-7)^{\frac{p-1}{2}}\equiv ({\frac{-7}{p}}) \pmod{p},$ then $2^{p+1}S_{p-1}\equiv({\frac{-7}{p}})-1 \pmod{p}$ 
Hence if $({\frac{-7}{p}})=1$ then $S_{p-1} \equiv 0 \pmod{p}$
