0

So I'm trying to show that n=3953 is composite. The information I have is that a does not equal $1(\mod p)$ and that if $a^2 = 1 (\mod p)$ then $a = -1 (\mod p)$. I also know $p$ is a prime and that $a=2949$. Now I'm very confused as to how to use this information to show that n is composite seeing as there's been no previous mention of n. If someone could explain this to me, step by step I'd really appreciate it.

Bill Dubuque
  • 282,220
  • p is an odd prime –  Jun 02 '20 at 17:09
  • 1
    There's not been a mention of n in the question which is why I'm confused and was wondering if maybe I'm lacking in some knowledge –  Jun 02 '20 at 17:10
  • $\sqrt {3953}\sim 63$ so the search for prime factors is pretty simple. – lulu Jun 02 '20 at 17:10
  • The easiest way to show that $n=3953$ is composite, is noting that $59\cdot 67=3953$ – Hagen von Eitzen Jun 02 '20 at 17:11
  • 1
    I'm supposed to use the information about a/p to prove this –  Jun 02 '20 at 17:11
  • 1
    But then there must be some connection between $n,a$ and $p$. – lulu Jun 02 '20 at 17:12
  • 1
    I mean...you could solve the congruence $a^2\equiv 1 \pmod {3953}$ to get $a\in {1,1004, 2949,3952}$ which immediately shows that $3953$ is composite but of course that is $\textit{ a lot}$ harder than just searching for a prime factor. – lulu Jun 02 '20 at 17:14
  • 1
    Just to say, $1249^2-1=1560000 = 2^6\times 3\times 5^4\times 13 $ which has no apparent connection to $3953$. – lulu Jun 02 '20 at 17:18
  • You might be misinterpreting something - could yo give a more verbatim copy of the problem statement? – Hagen von Eitzen Jun 02 '20 at 17:19
  • 1
    I just realised that I've written the incorrect number, it should be 2949. I'll edit now. –  Jun 02 '20 at 17:19
  • In this case we have $2949^2\equiv 1\mod 3953$ , but $2949\neq \pm1\mod 3953$ which is enough to show that $n$ is composite. $\gcd(a-1,n)$ and $\gcd(a+1,n)$ will both give a non-trivial factor., in this case actually the prime factors of $n$. – Peter Jun 02 '20 at 17:22
  • But still it is confusing that $a^2\equiv 1\mod p$ is given instead of $a^2\equiv 1\mod n$ – Peter Jun 02 '20 at 17:25
  • Yeah, the fact that it was mod p and not mod n was what was really throwing me off and it left me really confused. –  Jun 02 '20 at 17:26
  • Their point is that for primes, $p$, we can demonstrate that the only solutions to the congruence $a^2\equiv 1 \pmod p$ are $\pm 1 \pmod p$. Thus if you have found a non-trivial solution to that congruence for some modulus $n$ then you have shown that $n$ is not a prime. To be sure, this is not very helpful as a primality test. – lulu Jun 02 '20 at 17:34
  • Mathematica: $3953 = 59 \cdot 67$ – David G. Stork Jun 26 '25 at 03:46

3 Answers3

1

To summarize the discussion in the comments:

For a prime $p$ we have the nice fact that the congruence $$a^2\equiv 1\pmod p$$ has exactly two solutions (namely $a\equiv \pm 1 \pmod p$). It follows that if, for some $n$, you have a solution to $a^2\equiv 1 \pmod n$ which is neither $1$ nor $-1\pmod n$, $n$ can not be a prime. In this case it is easy to verify (by direct computation) that $$2949^2\equiv 1 \pmod {3953}$$ and, as $2949$ is plainly neither $1$ nor $-1\pmod {3953}$, we can be assured that $3953$ is not a prime.

To be sure, this is not a terribly efficient test for primality. In this case, of course, it depended on someone directing our attention to $2949$. Of course one could have found it, or $1004$ which works just as well, by a search, but all of that is considerably harder than just searching for prime factors of $3953$.

lulu
  • 76,951
0

Since $$\sqrt{3953}\approx 63$$ you only have to check all prime numbers below and equal to 63 if they divide $n$ equally.

Since $$3953 \bmod 59 \equiv 0$$ $n$ isn't a prime.

0

We all know that $2^{12}=64^{2}=4096$.

$n^{2}-(n-1)^{2}=(n^{2}-2n)+1$, so $63^{2}=(4096-64\times2)+1=3969$. $3969-3953=16$, and since $16=4^{2}$, then $3953$ is divisible by $59=63-4$ and $67=63+4$, and therefore, not a prime number.

Other than checking all prime numbers up to $\lfloor\sqrt{x}\rfloor$, another easier way is to see if $(\lfloor\sqrt{x}\rfloor+1)^{2}-a$ is a square number. If it is, then odd integer $a$ is divisible by prime factors of the $(\lfloor\sqrt{x}\rfloor+1)^{2}\pm$ (square root of their difference).

J. W. Tanner
  • 63,683
  • 4
  • 43
  • 88