Factorial and square number

{ p ! + 1 = ( 2 p + 1 ) 2 q ! + 1 = ( 10 q + p 4 ) 2 \large \begin{cases} p!+1= (2p+1)^{2} \\ q!+1=(10q+p-4)^{2} \end{cases}

Let p p and q q be prime numbers satisfying the system of equations above. Find p + q p + q .

Hint : You may find Wilson's theorem useful.

Notation : ! ! denotes the factorial notation. For example, 8 ! = 1 × 2 × 3 × × 8 8! = 1\times2\times3\times\cdots\times8 .


The answer is 12.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Tommy Li
Jun 20, 2016

p ! + 1 = ( 2 p + 1 ) 2 p!+1= (2p+1)^{2}

p ! + 1 = 4 p 2 + 4 p + 1 p!+1=4p^{2}+4p+1

p ! = p ( 4 p + 4 ) p!=p(4p+4)

( p 1 ) ! = 4 p + 4 (p-1)!=4p+4

( p 1 ) ! 4 p + 4 1 ( m o d p ) (p-1)! \equiv 4p+4 \equiv -1 \pmod {p} (By Wilson's theorem)

4 p 5 ( m o d p ) 4p \equiv -5 \pmod {p}

0 5 ( m o d p ) 0 \equiv -5 \pmod {p}

5 0 ( m o d p ) 5 \equiv 0 \pmod {p}

p = 5 \Rightarrow p=5


q ! + 1 = ( 10 q + 5 4 ) 2 q!+1=(10q+5-4)^{2}

q ! + 1 = ( 10 q + 1 ) 2 q!+1=(10q+1)^{2}

q ! + 1 = 100 q 2 + 20 q + 1 q!+1=100q^{2}+20q+1

q ! = q ( 100 q + 20 ) q! = q(100q+20)

( q 1 ) ! = 100 q + 20 (q-1)! = 100q+20

( q 1 ) ! 100 q + 20 1 ( m o d q ) (q-1)! \equiv 100q+20 \equiv -1 \pmod {q} (By Wilson's theorem)

100 q 21 ( m o d q ) 100q \equiv -21 \pmod {q}

0 21 ( m o d q ) 0 \equiv -21 \pmod {q}

21 0 ( m o d q ) 21 \equiv 0 \pmod {q}

q = 3 ( r e j . ) \Rightarrow q=3 (rej.) or q = 7 q=7

q = 7 \Rightarrow q=7


p + q = 5 + 7 = 12 p+q = 5+7 =12

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...