1 Introduction

For any positive integer \(q\geq2\) and Dirichlet character \(\chi\bmod q\), the classical Gauss sum \(\tau(\chi)\) is defined as

$$\tau(\chi) = \sum_{a=1}^{q}\chi(a) e \biggl(\frac{a }{q} \biggr), $$

where \(e(y) = e^{2\pi i y}\).

This sum is very important in the study of the analytic number theory, so many authors had studied its elementary properties, and obtained a series of important results. In fact, if χ is a primitive character modq, then one has the identity \(|\tau(\chi)|=\sqrt{q}\). For the general character \(\chi\bmod q\), we have the estimate \(|\tau (\chi)|\leq\sqrt{q}\). From some special characters \(\chi\bmod q\), the Gauss sum \(\tau(\chi)\) has some interesting properties. For example, if p is a prime with \(p\equiv1\bmod3\), and ψ is any third-order character \(\bmod\ p\), then we have the identity [1, 2]

$$\tau^{3} (\psi )+ \tau^{3} (\overline{\psi} )=dp, $$

where d is uniquely determined by \(4p=d^{2}+27b^{2}\) and \(d\equiv1\bmod 3\).

Zhuoyu Chen and Wenpeng Zhang [3] obtained a similar formula for the quartic Gauss sum (see Lemma 2 below). Of course, there are also many similar results, and we are not going to list them here. The reader can refer to Refs. [47] and [8] for details.

In this paper, we are considering such a sequence \(F_{k}(p)\) as follows: Let p be a prime with \(p\equiv1\bmod8\), ψ be any eighth-order character modp. For any integer \(k\geq0\), we define the sequence \(F_{k}(p)\) as

$$ F_{k}(p)=\frac{\tau^{k} (\psi )}{\tau^{k} (\psi^{3} )}+ \frac {\tau^{k} (\psi^{3} )}{\tau^{k}(\psi)}. $$
(1)

The sequence \(F_{k}(p)\) defined in (1) is clearly a second-order linear recurrence sequence. However, to find the exact value of this sequence, noting that \(F_{0}(p)=2\), we must know its first term \(F_{1}(p)\). Generally, \(F_{1}(p)\) is very difficult to calculate. But if ψ is an eighth-order character modp, then we can deduce some interesting results. In this paper, we will focus on illustrating this point. That is, we shall prove the following two results.

Theorem 1

Let p be a prime with \(p\equiv1\bmod8\), then, for any integer \(k\geq2\), we have the second-order linear recursive formula

$$F_{k}(p)=C\cdot F_{k-1}(p)- F_{k-2}(p), $$

where \(F_{0}(p)=2\), \(C=F_{1}(p)=\pm\sqrt{2+\frac{2\alpha}{\sqrt{p}}}\), and the constant \(\alpha=\alpha(p)\) is an integer, which is closely related to prime p.

In fact, we have a very important square-sum formula,

$$p= \Biggl(\sum_{a=1}^{\frac{p-1}{2}} \biggl( \frac{a+\overline{a}}{p} \biggr) \Biggr)^{2}+ \Biggl(\sum _{a=1}^{\frac{p-1}{2}} \biggl(\frac{ra+\overline {a}}{p} \biggr) \Biggr)^{2}\equiv\alpha^{2}+\beta^{2}, $$

where \((\frac{*}{p} )\) denotes the Legendre symbol modp, r is any integer with \((\frac{r}{p} )=-1\) (see Theorem 4-11 in [9]).

Theorem 2

Let p be a prime with \(p\equiv1\bmod8\), then, for any real number \(k\geq2\), we have the second-order linear recursive formula

$$F_{2k}(p)=\frac{2\alpha}{\sqrt{p}}\cdot F_{2k-2}(p)- F_{2k-4}(p), $$

where \(F_{0}(p)=2\) and \(F_{2}(p)=\frac{2\alpha}{\sqrt{p}}\).

Since \(|\alpha|\leq\sqrt{p}\), the two roots of the equation \(x^{2}-\frac {2\alpha}{\sqrt{p}}x+1=0\) are

$$x_{1}=\frac{\alpha+i\sqrt{p-\alpha^{2}}}{\sqrt{p}} \quad\mbox{and}\quad x_{2}=\frac{\alpha-i\sqrt{p-\alpha^{2}}}{\sqrt{p}}, $$

where i is the imaginary unit. That is, \(i^{2}=-1\).

Therefore, from the properties of the second-order linear recursive sequence we have the computational formula

$$F_{2k}(p)= \biggl(\frac{\alpha+i\sqrt{p-\alpha^{2}}}{\sqrt{p}} \biggr)^{k}+ \biggl( \frac{\alpha+i\sqrt{p-\alpha^{2}}}{\sqrt{p}} \biggr)^{k}. $$

Some notes: How to determine the positive or negative signs of \(C=F_{1}(p)\) in Theorem 1 is an interesting open problem.

It is clear that \(\phi(5)=\phi(8)=\phi(12)=4\). Therefore, whether there is a similar second-order linear recurrence formula for the fifth-order (or twelfth-order) character modp remains to be further studied.

2 Several lemmas

In this section, we need to prove several simple lemmas, which is necessary in the proofs of our theorems. Hereinafter, we shall use many properties of the classical Gauss sum and Dirichlet characters modp (an odd prime); all of them can be found in Ref. [10], so they will not be repeated here.

Lemma 1

Let p be a prime with \(p\equiv1\bmod8\), ψ be an eighth-order character modp. Then we have the identity

$$\tau^{2} \bigl(\overline{\psi}^{2} \bigr)=p\cdot \frac{\tau^{2} (\psi ^{3} )}{\tau^{2}(\psi)}. $$

Proof

Since \(p\equiv1\bmod8\), there exist 4 eighth-order characters modp, let ψ be one of them; \(\chi_{2}\) denotes the Legendre symbol modp. For any integer m with \((m, p)=1\), note that we have the identities \(\overline{\psi}\chi_{2}=\psi^{3}\) and

$$\sum_{a=0}^{p-1}e \biggl(\frac{ma^{2}}{p} \biggr)= \sum_{a=0}^{p-1} \bigl(1+ \chi_{2}(a) \bigr)e \biggl(\frac{ma}{p} \biggr)= \chi_{2}(m)\tau(\chi_{2})=\chi _{2}(m)\sqrt{p}, $$

from the properties of the classical Gauss sum we have

$$\begin{aligned} \sum_{a=0}^{p-1}\psi \bigl(a^{2}-1 \bigr) =&\frac{1}{\tau (\overline {\psi} )}\sum_{a=0}^{p-1}\sum _{b=1}^{p-1}\overline{\psi}(b)e \biggl( \frac{b (a^{2}-1 )}{p} \biggr) \\ =&\frac{1}{\tau (\overline{\psi} )}\sum_{b=1}^{p-1} \overline {\psi}(b)e \biggl(\frac{-b}{p} \biggr)\sum _{a=0}^{p-1}e \biggl(\frac {ba^{2}}{p} \biggr) \\ =& \frac{\sqrt{p}}{\tau (\overline{\psi} )}\sum_{b=1}^{p-1}\overline{ \psi}(b)\chi_{2}(b)e \biggl(\frac{-b}{p} \biggr) \\ =&\frac{\psi(-1)\sqrt{p}}{\tau (\overline{\psi} )}\sum_{b=1}^{p-1} \psi^{3}(b)e \biggl(\frac{b}{p} \biggr) \\ =&\frac{\psi(-1)\sqrt {p}\cdot\tau (\psi^{3} )}{\tau (\overline{\psi} )}. \end{aligned}$$
(2)

On the other hand, from the properties of the classical Gauss sum we also have

$$\begin{aligned} \sum_{a=0}^{p-1}\psi \bigl(a^{2}-1 \bigr) =&\sum_{a=0}^{p-1}\psi \bigl((a+1)^{2}-1 \bigr)=\sum_{a=1}^{p-1} \psi \bigl(a(a+2) \bigr) \\ =&\frac{1}{\tau (\overline{\psi} )}\sum_{b=1}^{p-1} \overline {\psi}(b)\sum_{a=1}^{p-1}\psi(a)e \biggl(\frac{b(a+2)}{p} \biggr) =\frac{\tau(\psi)}{\tau (\overline{\psi} )}\sum _{b=1}^{p-1}\overline{\psi}^{2}(b)e \biggl( \frac{2b}{p} \biggr) \\ =&\psi^{2}(2)\cdot\frac{\tau (\overline{\psi}^{2} )\tau(\psi )}{\tau (\overline{\psi} )}. \end{aligned}$$
(3)

Note that \(\psi^{4}=\chi_{2}\) and \(\chi_{2}(2)=1\), from (2) and (3) we have the identity

$$\tau^{2} \bigl(\overline{\psi}^{2} \bigr)=p\cdot \frac{\tau^{2} (\psi ^{3} )}{\tau^{2}(\psi)}. $$

This proves Lemma 1. □

Lemma 2

Let p be an odd prime with \(p\equiv1\bmod4\), λ be any fourth-order character modp. Then we have the identity

$$\tau^{2}(\lambda)+ \tau^{2} (\overline{\lambda} )=\sqrt{p} \cdot \sum_{a=1}^{p-1} \biggl( \frac{a+\overline{a}}{p} \biggr)= 2\sqrt{p}\cdot\alpha. $$

Proof

See Lemma 2.2 in [3]. □

Lemma 3

Let p be a prime with \(p\equiv1 \bmod 8\), ψ be an eighth-order character modp. Then we have the identity

$$\frac{\tau^{2} (\psi )}{\tau^{2} (\psi^{3} )}+ \frac{\tau ^{2} (\psi^{3} )}{\tau^{2}(\psi)}=\frac{2\alpha}{\sqrt{p}}, $$

where α is defined as in Theorem 1.

Proof

It it clear that if ψ is an eighth-order character modp, then \(\psi^{3}\) is also an eighth-order character modp. So substituting ψ by \(\psi^{3}\) in Lemma 1, and noting that \(\psi ^{9}=\psi\), \(\overline{\psi}^{6}=\psi^{2}\), from Lemma 1 we have

$$ \tau^{2} \bigl(\psi^{2} \bigr)=p\cdot\frac{\tau^{2} (\psi )}{\tau ^{2} (\psi^{3} )}. $$
(4)

Note that \(\psi^{2}\) is a fourth-order character modp, from (4), Lemma 1 and Lemma 2 we may immediately deduce the identity

$$p \biggl(\frac{\tau^{2} (\psi )}{\tau^{2} (\psi^{3} )}+ \frac {\tau^{2} (\psi^{3} )}{\tau^{2}(\psi)} \biggr)= \tau^{2} \bigl(\psi ^{2} \bigr)+\tau^{2} \bigl(\overline{ \psi}^{2} \bigr)=2\sqrt{p}\cdot\alpha, $$

which implies the identity

$$\frac{\tau^{2} (\psi )}{\tau^{2} (\psi^{3} )}+ \frac{\tau ^{2} (\psi^{3} )}{\tau^{2}(\psi)}=\frac{2\alpha}{\sqrt{p}}. $$

This proves Lemma 3. □

3 Proofs of the theorems

Now we will complete the proofs of our main results. First we prove Theorem 1. Let p be a prime with \(p\equiv1\bmod8\), ψ be an eighth-order character modp. For any integer \(k\geq0\), we define

$$F_{k}(p)=\frac{\tau^{k} (\psi )}{\tau^{k} (\psi^{3} )}+ \frac {\tau^{k} (\psi^{3} )}{\tau^{k}(\psi)}. $$

It is clear that from Lemma 3 we have \(F_{0}(p)=2\) and

$$ \frac{2\alpha}{\sqrt{p}}+2= \frac{\tau^{2} (\psi )}{\tau^{2} (\psi^{3} )}+ \frac{\tau^{2} (\psi^{3} )}{\tau^{2}(\psi)}+2= \biggl( \frac{\tau (\psi )}{\tau (\psi^{3} )}+ \frac{\tau (\psi^{3} )}{\tau(\psi)} \biggr)^{2}. $$
(5)

From (5) we can deduce that

$$ F_{1}(p)=\pm\sqrt{2 \biggl(1+\frac{\alpha}{\sqrt{p}} \biggr)}=C. $$
(6)

If \(k\geq1\), then from the definition of \(F_{k}(p)\) we have

$$\begin{aligned} F_{k}(p)\cdot F_{1}(p)= \biggl(\frac{\tau^{k} (\psi )}{\tau^{k} (\psi ^{3} )}+ \frac{\tau^{k} (\psi^{3} )}{\tau^{k}(\psi)} \biggr) \biggl(\frac{\tau (\psi )}{\tau (\psi^{3} )}+ \frac{\tau (\psi^{3} )}{\tau(\psi)} \biggr) =F_{k+1}(p)+F_{k-1}(p) \end{aligned}$$

or the second-order linear recursive formula

$$F_{k+1}(p)=C\cdot F_{k}(p)-F_{k-1}(p), $$

where \(F_{0}(p)=2\) and \(F_{1}(p)=\pm\sqrt{2 (1+\frac{\alpha}{\sqrt {p}} )}\).

This proves Theorem 1.

Similarly, we can deduce Theorem 2. In fact, for any integer \(k\geq1\), from Lemma 3 we have

$$\frac{2\alpha}{\sqrt{p}}\cdot F_{2k}(p)= \biggl(\frac{\tau^{2} (\psi )}{\tau^{2} (\psi^{3} )}+ \frac{\tau^{2} (\psi^{3} )}{\tau^{2}(\psi)} \biggr) \biggl(\frac{\tau^{2k} (\psi )}{\tau ^{2k} (\psi^{3} )}+ \frac{\tau^{2k} (\psi^{3} )}{\tau ^{2k}(\psi)} \biggr)=F_{2k+2}(p)+F_{2k-2}(p) $$

or the second-order linear recursive formula

$$F_{2k}(p)= \frac{2\alpha}{\sqrt{p}}\cdot F_{2k-2}(p)+ F_{2k-4}(p), $$

where the first two terms are \(F_{0}(p)=2\) and \(F_{2}(p)=\frac{2\alpha }{\sqrt{p}}\).

This completes the proof of Theorem 2.