Quartic, octic residues and binary quadratic forms
  Let $\Bbb Z$ be the set of integers, and let $(m,n)$ be the greatest common divisor of integers $m$ and $n$. Let $p\equiv 1\mod 4$ be a prime, $q\in\Bbb Z$, $2\nmid q$ and $p=c^2+d^2=x^2+qy^2$ with $c,d,x,y\in\Bbb Z$ and $c\e 1\mod 4$. Suppose that $(c,x+d)=1$ or $(d,x+c)$ is a power of 2. In the paper, by using the quartic reciprocity law we determine $q^{[p/8]}\mod p$ in terms of $c,d,x$ and $y$, where $[\cdot]$ is the greatest integer function. We also determine $\big(\frac{b+\sqrt{b^2+4^{\alpha}}}2\big)^{\frac{p-1}4}\mod p$ for odd $b$ and $(2a+\sqrt{4a^2+1})^{\f{p-1}4}\mod p$ for $a\in\Bbb Z$. As applications we obtain the congruence for $U_{\f{p-1}4}\mod p$ and the criterion for $p\mid U_{\frac{p-1}8}$ (if $p\equiv 1\mod 8$), where $\{U_n\}$ is the Lucas sequence given by $U_0=0,\ U_1=1$ and $U_{n+1}=bU_n+U_{n-1}\ (n\ge 1)$, and $b\not\equiv 2\mod 4$. Hence we partially solve some conjectures posed by the author in two previous papers. 
Zhi-Hong Sun
math.NT