Is there a method to solve this congruence equation? Consider: $\qquad71\cdot 6^n\equiv a^2\pmod {239}$, where $a$ and $n$ are positive integers.
$a=1$ is a solution for $n=4$,  $a=6$ is another solution for $n=6$.
Is there a general method to find all the solutions to the above equation? I imagine that these are quadratic residues$\pmod {239}$, or not?
HINT.- $239$ is prime so you have to make calculations in the field $\mathbb F_{239}$. One has
$6^n=\dfrac{a^2}{71}$ in the field. Now $71^{-1}=203$ and $71=73^2$ and $71=166^2$ then
$$6^n=(203a)^2\\6^n=(166a)^2$$ What more? Is $6$ square in $\mathbb F_{239}$, for example? Is $n$ necessarily even?
Need use multiplicative order and discrete logarithm.
gp-code:
an239()=
{
 m= Mod(6,239);
 h= znorder(m);
 for(b=1, 238,
  B= polrootsmod(71*b-'a^2, 239)~;
  if(#B,
   z= znlog(b, m, h);
   if(b==1 || z,
    print(&quot;(&quot;lift(B[1])&quot;, &quot;z&quot;+j*&quot;h&quot;)    &quot;b);
    print(&quot;(&quot;lift(B[2])&quot;, &quot;z&quot;+j*&quot;h&quot;)    &quot;b)
   )
  )
 )
};

$(a,n)$=
(73, 0+j*17)
(166, 0+j*17)
(67, 1+j*17)
(172, 1+j*17)
(75, 9+j*17)
(164, 9+j*17)
(40, 2+j*17)
(199, 2+j*17)
(51, 16+j*17)
(188, 16+j*17)
(6, 6+j*17)
(233, 6+j*17)
(107, 7+j*17)
(132, 7+j*17)
(71, 13+j*17)
(168, 13+j*17)
(28, 11+j*17)
(211, 11+j*17)
(1, 4+j*17)
(238, 4+j*17)
(22, 5+j*17)
(217, 5+j*17)
(23, 10+j*17)
(216, 10+j*17)
(36, 8+j*17)
(203, 8+j*17)
(52, 15+j*17)
(187, 15+j*17)
(111, 14+j*17)
(128, 14+j*17)
(101, 12+j*17)
(138, 12+j*17)
(76, 3+j*17)
(163, 3+j*17)

where $j$=0,1,2,...