1
$\begingroup$

I would like to know, how to input and solve following equation in Matlab:

$2^x \equiv 456 \ (\text{mod}\ 582)$

Is there a way to find $x$ in Matlab?

  • 1
    I don't know anything about Matlab, but I can say no solution exists to that specific problem if it helps.2017-02-01

1 Answers 1

0

This equation has no solution: indeed, as $582=6\times 97$, a solution would imply $$2^x\equiv 456\equiv 68\mod 97.$$ However, as $2$ has order $48\bmod 97$, this would imply $68^{48}\equiv 1\mod 97$. However the fast exponentiation algorithm shows $68^{48}\equiv -1\mod 97$.

Added:

@Mike observed, it's much simpler to consider congruences mod. $3$: $456\equiv 0\mod 3$, and $2$ is a unit mod $3$, so none of its powers can be congruent to $456 \bmod 3$.

  • 2
    Much more straightforward to do $2^x\equiv0\pmod3$. A power of 2 will never be a multiple of 3.2017-02-01
  • 0
    Oh! yes. Don't lnow why I missed it. Probably because I only thought mod $6$, and $2$ is a zero divisor mod $6$, so I looked on the $97$ side. I'll add it to the answer.2017-02-01