1

Is there a way of solving $x^2 \equiv 1156 \text{ }(\text{ mod } 3^2 5^3 7^5 11^6)$ without having to solve 16 linear simultaneous congruences? I have found the solutions $x\equiv 34 \text{ } (\text{ mod } 3^2 5^3 7^5 11^6)$ and $x\equiv 583950794659 \text{ } (\text{ mod } 3^2 5^3 7^5 11^6)$. Is there a way of generating the rest of the solutions based on those? I have also found the solutions to $x^2 \equiv 1156 \text{ } (\text{ mod } 3^2) $, $x^2 \equiv 1156 \text{ } (\text{ mod } 5^3) $, $x^2 \equiv 1156 \text{ } (\text{ mod } 7^5) $ and $x^2 \equiv 1156 \text{ } (\text{ mod } 11^6) $

Bill Dubuque
  • 272,048
  • Please edit to include your efforts. One pair of solutions should be fairly easy to spot, and that makes the entire problem easy enough. – lulu Jun 13 '22 at 20:39
  • Yes. Let $n = 1156.$ Solve $x^2 \equiv n \pmod{3}.$ Then, solve $x^2 \equiv n \pmod{3^2}.$ Then, solve $x^2 \equiv n \pmod{5}.$ Then, solve $x^2 \equiv n \pmod{5^2}.$ Then, solve $x^2 \equiv n \pmod{5^3}.$ Rinse and repeat for $(7)$ and $(11)$. Then, solve $(4)$ simultaneous equations, using the Chinese Remainder Theorem. ...see next comment. – user2661923 Jun 13 '22 at 20:39
  • Actually, my Number Theory knowledge has decades of cobwebs on it. However, the approach in my previous comment represents what my first try would be. – user2661923 Jun 13 '22 at 20:40
  • 1
    If I remember correctly, when you are dealing with (for example) $(4)$ simultaneous congruences, you can deal with them $(2)$ at a time. So, you never have to deal with more than $2$ congruences at any one time. – user2661923 Jun 13 '22 at 20:43
  • 1
    As you say, one pair of solutions is $\pm 34$. Start by proving that these are the only solutions $\pmod p^n$ for each of the prime factors. Now get the general solution by choosing the signs for each factor. – lulu Jun 13 '22 at 21:05
  • sorry, typo: That should have read $\pmod {p^n}$. – lulu Jun 13 '22 at 21:15
  • It might be useful to note that $1156 = 3\cdot 5\cdot 7\cdot 11 + 1$. Or, $1156 \equiv 1 \pmod{\in 3,5,7,11}$, to abuse notation a bit. – Eric Snyder Jun 14 '22 at 00:10

1 Answers1

0

I don't believe there is a method to easily derive all $16$ solutions from the $\,2\,$ you've found. However, we can generate them fairly quickly as follows. As explained here, applying CRT formula below for generic (symbolic) residues $\,a_i\,$ we can compute CRT coef's $\,c_i\,$ in the formula (done further below)

$\qquad\begin{align} x\equiv a_3\!\! &\pmod{\!3^2}\\ x\equiv a_5\!\! &\pmod{\!5^3}\\ x\equiv a_7\!\! &\pmod{\!7^5}\\ x\equiv a_{11}\!\!\!\! &\pmod{\!11^6}\end{align}\!\!$ $\!\iff x\equiv c_3 a_3 + c_5 a_5 + c_7 a_7 + c_{11} a_{11} \pmod{\overbrace{3^2 5^3 7^5 11^6}^{\large m}}$

Computing RHS sum for all $16$ combinations of $\,a_i = \pm 34 =\sqrt{1156}\,$ yields all solutions $\!\bmod m$.

Optimizations: we need only compute $8$ combinations, since we can fix one, say $\,a_{11}=34,\,$ then negate these $8$ solutions to get those with $\,a_{11}= -34.\,$ One solution is easy: the solution with all $\,a_i = 34\,$ is $\,x\equiv 34\pmod{\!m}\,$ by CCRT.

Further, we can eliminate most multiplications by absorbing $\,|a_i| = 34\,$ into all $\,c_i,\,$ e.g.

$$\hat m_3:= 5^3 7^5 11^6,\,\ \ c_3 := \hat m_3\left(\dfrac{34}{\hat m_3}\bmod 3^2\right)\equiv 18609141079375\equiv 34\!\!\!\pmod{\!3^2}\qquad$$

Similarly $\,c_5 = 23581503575784,\ c_7 = 16456251574125,\ c_{11} = 8346011656500$.

With these $\,c_i\,$ we need only compute $\,x=\sum c_i a_i\,$ for $\,a_i = \pm1,\,$ which requires only modular additions and subtractions (no multiplications or inversions), which quickly & easily yields

$$\begin{array}{|r|r|r|r|r|r|} \hline a_3&a_5&a_7&a_{11}\!& x& -x\\\hline 1 & 1 & 1 & 1 & 34 & 33496453942841 \\\hline -1& 1 & 1 & 1 & 29774625727034 & 3721828215841 \\\hline 1&-1& 1& 1& 19829900734216 & 13666553208659\\\hline 1& 1& -1& 1& 583950794659& 32912503148216\\\hline -1&-1& 1& 1 &16108072518341& 17388381424534\\\hline -1& 1&-1& 1 &30358576521659& 3137877421216\\\hline 1&-1&-1& 1 &20413851528841& 13082602414034\\\hline -1&-1&-1& 1 &16692023312966& 16804430629909\\\hline \end{array}\qquad\qquad$$

Note that absorbing $\,34\,$ into the $\,c_i\,$ amounts to using $\sqrt{1156}=\sqrt{34^2} = 34\sqrt{1},\,$ which transforms the problem into computing modular square-roots of unity (see also this post on the modular quadratic formula).

Bill Dubuque
  • 272,048