0

Let $p$ be a prime number and let $1 \leq n < p$ be a non-negative integer number.

Show that there exist $x,y \in \mathbb{Z}$ such that $n x + p y = 1$.

user693
  • 2,693
  • 1
    Since $1\leq n <p$ you have that gcd$(n,p)$=1. Then use Bezout identity http://en.wikipedia.org/wiki/B%C3%A9zout%27s_identity – PITTALUGA Oct 10 '13 at 14:28
  • 2
    The nonnegativity information is just to fill up space. Consider that since $p$ is prime, it is coprime to all the integers before it, and consider the euclidean algorithm. – chubakueno Oct 10 '13 at 14:33

2 Answers2

1

The Bezout Lemma states that for given $a$ and $b$ then the equation

$$ax + by = gcd(a,b)$$

has integer solution for $x$ and $y$.

Our equation have form of

$$px + ny = 1$$

So $gcd(p,n) = 1$

Because $p$ is prime number and $1\le n< p$, it's obvious that $n$ can't be multiple of $p$.

Note that n must be non-negative integer, otherwise if $n=-p$, we'll have $gcd(p,-p) = p$, which won't be able to find a integer solution for our initial eqaution.

Stefan4024
  • 35,843
1

Consider the set $X$ of positive integers of the form $$ nx+py $$ with $x$ and $y$ integers. This set is non empty, because $$n^2+p^2=n\cdot n+p\cdot p\in X$$. Therefore it has a minimum, call it $d=nx_0+py_0$.

  1. Let's prove that $d$ divides $p$. Indeed, $p=dq+r$ with $0\le r<p$; assuming $r>0$, from $$r=p-dq=n(-qx_0)+p(1-qy_0)$$ we deduce that $r\in X$, which is absurd.

  2. Similarly $d$ divides $n$.

So $d$ is a divisor of $p$ that divides $n$, hence it must be $d=1$.

Actually the same technique can be used for proving that, in general, the minimum positive integer of the form $ax+by$, with $x,y\in\mathbb{Z}$, is the greatest common divisor of $a$ and $b$.

Of course such a nonconstructive proof is much less useful than the constructive one with Euclid's algorithm, but it can be used almost verbatim in the general case of Euclidean domains. Please, don't use it for your homework: your teacher will surely guess it's not yours.

egreg
  • 238,574