Solving a congruence with a variable remainder

132 Views Asked by At

Using a MS Excel spreadsheet, was conjecturing the following scenario, of a congruence such that:

$ 7+3*x\equiv2*x+5\pmod{42}$

Where a solution is:

$\quad x = 6$

In 'rebalancing' the congruent equation to:

$ 12+5*x\equiv0\pmod{42}$

We also obtain a solution of:

$\quad x = 6$

However in algebraically 'rebalancing' the first congruent equation to:

$ 2+x\equiv0\pmod{42}$

The solutions obtained were:

$\quad x = {0,1,4,5,12, 19...}$

Is the first method of 'rebalancing' mathematically sound?

Or was I engaging in 'Voodoo' mathematics?

1

There are 1 best solutions below

0
On

As Bill Dubuque commented, your first "rebalancing" was not valid.

$7+3x\equiv2x+5\mod42\implies(7+3x)-(2x+5)=2+x\equiv0\mod42$.

Furthermore, the solution to $2+x\equiv0 \mod 42$ is $x\equiv-2\equiv40\mod 42$.

I don't know how you got $x=0, 1, 4, 5, 12, 19... $, but that would imply $x+2\equiv 2, 3, 6, 7, 14, 21... $,

respectively, not $x+2\equiv0\mod 42$.

Solving equations in integers modulo $42$ is similar to solving equations in $\Bbb R$.