Absurd Prime

If a prime p p can be expressed as the difference of square of two positive integers, then find the remainder, when p 2 + 138 p^{2}+138 is divided by 4 4 .


The answer is 3.

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.

26 solutions

Let the positive integers be a a and b b , then we've, a 2 b 2 = p a^{2}-b^{2}=p , or ( a + b ) ( a b ) = p (a+b)(a-b)=p . Now, since p p is a prime, thus, it can't have two prime factors other than 1 1 or p p . Thus, one of the two factors, must be equal to 1 1 . Now, since, ( a b ) (a-b) is smaller of the two, thus, it must be equal to 1 1 . Thus, ( a b ) = 1 (a-b)=1 and ( a + b ) = p (a+b)=p . Solving the former, we get, a = b + 1 a=b+1 . Substituting in second equation, b = ( p 1 ) / 2 b=(p-1)/2 and a = ( p + 1 ) / 2 a=(p+1)/2 . Thus a b = ( p 2 1 ) / 4 ab=(p^{2}-1)/4 . Now, since a b ab is an integer, therefore, p 2 1 p^{2}-1 is div. by 4 4 . or, 4 4 divides ( p 2 1 ) + 136 = p 2 + 135 (p^{2}-1)+136=p^{2}+135 . [Since, 136 136 is divisible by 4 4 .]. Thus, on dividing p 2 + 138 p^{2}+138 by 4 4 , the remainder is 3 3 . [since, p 2 + 135 p^{2}+135 is div. by 4 4 ].

3 same as above

Dodda Praful - 7 years ago

Actual i too got the answer just with simple example(2^2-1^2=3...138+9=147...147/4-R=3)......but where do you learn these actual stuff....its amazing man...cool love it

Srini Vas - 7 years ago

If someone did not know anything at all about primes, they would still have 3/4 chance of being "right" if they knew that the remainder can only be numbers 0, 1, 2, 3, as everyone gets 3 attempts at answering. The problem is not well designed.

Marta Reece - 4 years, 5 months ago

got 3 as the answer

Anuj Shikarkhane - 7 years ago

\Most s o p h i s t i c a t e d a n s w e r \bold\Most sophisticated answer

Prokash Shakkhar - 4 years, 6 months ago

Done in the same way

sai venkat - 4 years, 3 months ago

Excellent bro

Ram Pathak - 3 years, 5 months ago

Well, the fact that p = (a + b)(a - b) is a red herring: it is just supposed to tell you that p is odd (not 2). By quadratic residue, every p² + 138 is congruent to 3 (mod 4)

Eduardo Gomes Bonilha Gonçalves - 3 years, 5 months ago

What about 2^2 - 1^2 = 3

138 + 3 = 141

Remainder when 141/4 is 1.

Sujay Sheth - 7 years ago

Log in to reply

Note that it asked for p 2 + 138 p^2 + 138 as opposed to 138 + p 138 + p .

Calvin Lin Staff - 7 years ago

Actually the question is (P^2 + 138). So, P=3 => 3^2+138 = 147. 147/4 = The remainder is 3*

Log in to reply

actually you are mistaken there is not only one prime 3 which can be written as the difference of two squares there are others such as 7 ,11, e.t.c. so if you do by putting a value its trial and error rather i did it by using modulo

akash deep - 6 years, 11 months ago

Log in to reply

@Akash Deep All odd numbers squared are 1 modulo 4. So the problem is trivially the addition of p^2 which is 1 modulo 4 plus `138 which is 2 modulo 4 to get 3 modulo 4.

Craig Thomas - 5 years, 2 months ago

dude, its P^2+138 not p+138 If that would had been p+138 then the answer would had been 1 always

Swarang Pundlik - 7 years ago

1 is not included in the set of prime numbers.

Ken Hodson - 5 years, 7 months ago

@sujay Sheth yup its 2 raise to 2 minus 1 raise to 2 which is equal to 4-1=3 hence acc. to given equation p square plus 138 divided by 4...so thus its P SQUARE NOT JUST P

Harsh Patel - 4 years, 7 months ago

its p^2. not p

Wahedul Arefin - 7 years ago

p^2 is there

LAKSHYA SINGH - 5 years, 5 months ago
Jon Pentland
May 31, 2014

It is clear that 2 2 cannot be expressed as the difference of two squares of positive integers (as it is congruent to 2 2 modulo 4 4 ), so p p must be odd. Hence, p 2 1 ( m o d 4 ) p^2 \equiv 1 \pmod{4} . Therefore, p 2 + 138 139 ( m o d 4 ) p^2+138 \equiv 139 \pmod{4} , and 139 3 ( m o d 4 ) 139 \equiv 3 \pmod{4} , so it follows that p 2 + 138 3 ( m o d 4 ) p^2+138 \equiv 3 \pmod{4} .

Clearly the easiest solution. Same here ;-)

Antonio Polino - 7 years ago

I've solved exactly the same way.

Dieuler Oliveira - 7 years ago

It's 1 mod 2 but why is it then 1 mod 4 instead of 3 mod 4?

Orlando Moreno - 3 years, 4 months ago

Log in to reply

p is 1 or 3 in mod 4. for both cases p-square is 1 in mod 4. (1x1=1 mod4 and 3x3=9 which is 1 in mod 4)

Mustafa İst - 3 years, 2 months ago

Since p must be odd, assuming p is 2n+1. And p^2 is now (2n+1)^2 which is 4n^2+4n+1, which is 1 mod 4.

In short, every square of odd number is 1 mod 4

Chun-kit Cheng - 2 years, 5 months ago

( p = a 2 c 2 ) ( p 2 ) ( p = 2 k + 1 ) p 2 + 138 = p 2 + 4 × 34 + 2 = ( 2 k + 1 ) 2 + 4 × 34 + 2 = 4 k 2 + 4 k + 4 × 34 + 2 + 1 = 4 ( k 2 + k + 34 ) + 3 ( p 2 + 138 ) m o d 4 = 3 (p=a^2-c^2)\Rightarrow (p\neq 2)\Rightarrow (p=2 k+1) \\ \therefore\ p^2+138=p^2+4\times 34+2 \\ =(2k+1)^2+4\times 34+2 \\ =4 k^2+4k+4\times 34+2+1 \\ =4(k^2+k+34)+3 \\ \therefore\ \boxed{(p^2+138) \mod 4 = 3}

That means for any prime p this property holds. It does not have to be of the form a²-b².

Prayas Rautray - 3 years, 11 months ago

Exactly, the information about p being a difference of squares is redundant.

Puiu Botan - 2 years, 2 months ago
Anurag Singh
Jun 2, 2014

Any prime no. when divided by 4 gives remainder 1. Hence, p^2/4 gives rem 1 and 138/4 gives rem 2. Therefore , overall rem=rem of (1+2)/4=3.

Pls read it as square of any prime no. when divided by 4 gives remainder 1

Anurag Singh - 7 years ago

Log in to reply

Me too solved d same way..!!

PUSHPESH KUMAR - 5 years, 8 months ago

how can u say that any prime no. when divided by 4 gives remainder 1..just check 7/4..

Harsh Patel - 4 years, 7 months ago

@Anuraq:

1.) Any prime no. except 2!

AND:

2.) You missed to take part 1 of the question into consideration (diff. of squares).

Anyway, these two issues cancel out each other.

Stephan E - 2 years, 7 months ago
Chris Roberts
Nov 25, 2015

It also happens to be that you have 3 guesses and there are 3 possible choices for a remainder of 4, 1,2, and 3. So you can theoretically guess all possible answers and get it right. However, I did solve it the same way as souhardya. Just saying that this question is flawed because of this reason.

Well yeah, I should have given options

Souhardya Sengupta - 4 years, 8 months ago

0 is also a choice

Jon Toby - 3 years, 2 months ago
Vu Vincent
Jun 22, 2017

We know that p = m 2 j 2 = ( m j ) ( m + j ) p = m^2 - j^2 = (m-j)(m+j) where m , j m, j are positive integers.

Since p p is prime, we have:

{ m j = 1 m + j = p \begin{cases} m-j=1 \\ m+j=p \end{cases} 2 m 1 = p \Leftrightarrow 2m-1=p

Squaring both sides, we get:

p 2 = 4 m 2 4 m + 1 p 2 = 4 ( m 2 m ) + 1 p^2 = 4m^2-4m+1 \Rightarrow p^2 = 4(m^2 - m) + 1

which means that the expression above leaves a remainder of 1 when divided by 4, in other words:

p 2 1 ( m o d 4 ) [ ] p^2 \equiv 1 \quad(mod \quad4)\quad \quad \quad [*]

We know that

138 2 ( m o d 4 ) [ ] 138 \equiv 2 \quad (mod \quad 4)\quad \quad \quad[**]

adding [ ] [**] and [ ] [*] , gives us:

p 2 + 138 3 ( m o d 4 ) p^2 + 138 \equiv 3 \quad (mod \quad 4)

Therefore, the remainder of the expression when divided by 4 is 3 \boxed{3}

Emmanuel Torres
Feb 9, 2017

Find the easiest example of a prime number that fits the description. 3 = 2^2 - 1^2. 3^2 +138 = 147. Remainder of 147 / 4 = Remainder of 47/4 = 11 Remainder 3.

Michael Dowling
Oct 2, 2017

You get 3 guesses on the answer of mod(x,4), which can only have 3 possible solutions regardless of all the hints in the question. So you shouldn't possibly get this wrong.

absolutely - this should have been set requiring people to get the answer in one attempt (which I did btw)

Thomas Sutcliffe - 3 years, 8 months ago
Shaarang Sharma
Sep 21, 2016

The two integers are 9 & 8 (9×9) - (8×8) =17 17×17= 289 289+138 =427 427÷4 gives remainder 3

The Prime Number can't be 2 as if 2=x^2-y^2, then X and Y wouldn't be integers, Therefore it is an ODD PRIME NUMBER in the form of 4k+1 or 4k-1... hence (4k-or+1)^2 + 4*34+2 = 4(p+34)+3.....Therfore Reminder is 3

Vikas Shelke
Jun 14, 2014

check for 4^2 - 3^2 = 7 , now 138 + 7^2 = 187 , reminder (187/4) = 3

Vikas Kumar Singh
Jun 10, 2014

p = 5 = 3^2 - 2^2 138+25 = 163 163/4 = 40 and remainder = 3

Niladri Dan
Jun 9, 2014

minimum difference of 2 squares=3. so, p=1(mod 2). (2k+1)^2=1(mod 4) . p should be the difference of a odd and a even square. (2k)^2=0(mod 4)=>p=1(mod 4)=>p^2=1(mod 4) 138=2(mod 4) p^2+138=1+2=3(mod 4) remainder=3

Krishna Garg
Jun 7, 2014

Since two prime numbers are such that,square of first should be bigger than the second one,also after substraction when added to 138 and divided by 4 shold come remainder as whole number. considering X & Y I found 7 and 6 are such prime numbers and when solved , my answer is 3 remainder. K.K.GARG,India

Maxis Jaisi
May 31, 2014

Let a^2 - b^2 = p (a+b)(a-b) = p

Difference of the two numbers is given by 2b, which is twice the number, b.

Now the only numbers that satisfy these conditions are a = 3 and b = 2, because 3^2 - 2^2 = 5, a prime which is good.

Next (3+2)-(3-2) = 4, which is 2(2), 2b, again, great.

Knowing that p = 5, the solution follows.

Actually what I think is that the question was about the remainder which is always 3 for the given equation p^2 +138 So if you apply any difference between two squares then apply to the given equation the remainder will be three.

Laith Hameed - 7 years ago

Log in to reply

You're right.

Maxis Jaisi - 7 years ago
Shlok Panch
Jun 3, 2021

the picture is epic

Hossain Nahdi
Mar 5, 2021

If p p is a prime number, then p p must be either 2 or any other odd number . since the difference the squares of two positive integers can never be 2 , then p must be an odd number.

If p p is an odd number, the number can be written as 2 x + 1 2x+1 for a certain value of x x . In other words, we can rewrite our equation as: ( 2 x + 1 ) 2 + 138 N ( m o d 4 ) (2x+1)^2 + 138 \equiv N \pmod{4} o r or , 4 x 2 + 4 x + 1 + 138 N ( m o d 4 ) 4x^2 + 4x + 1 + 138 \equiv N \pmod{4} o r or , 0 + 0 + 1 + 2 N ( m o d 4 ) 0 + 0 + 1 + 2 \equiv N \pmod{4} o r or , 3 N ( m o d 4 ) 3 \equiv N \pmod{4} .

Therefore, our answer is 3 \boxed{3} .

Thomas Page
Feb 9, 2020

If p = 2 then 138 + 4 = 142 and 142 / 4 = 35 + 1/2 so remainder is 2/4 If p is greater than 2 then the remainder is 3/4

Ervyn Manuyag
Nov 8, 2018

I tested 2 and 1 ants I got 3 A’s the remainder

Josh Hainge
Oct 11, 2018

NB: This isn't a formal proof, and relies on the phrasing of the question.

p 2 = x 2 y 2 p^2 = x^2 - y^2 with all three numbers being integers. Rearranging gives p 2 + y 2 = x 2 p^2 + y^2 = x^2 , which we can use to conceptualize the three numbers as side lengths of a right triangle (x being the hypotenuse). Since all three numbers are integers, we have a pythagorean triple.

This is where the fudgery comes in. Since we know there exists more than one pythagorean triple, and since there is no way know which, if any, the author had in mind when writing the question, this implies to me that it doesn't matter which one is used going forward (i.e. all triples will give the same answer to the question).

Pick the easy triple: 3, 4, 5. The hypotenuse must be 5, and therefore 3 = p 3 = p , as 4 is not prime. The answer then follows from a simple calculation.

let us take p=(3-2)(3+2) i.e. smallest possibility for difference of square of 2 positive no.s yielding a prime no. then => p=5 & p^2+138=25+138=163 thus remainder is 3

Scott Broughton
Oct 23, 2017

This isn't really a "solution", but I just used Pythagoras' theorem, a2 + b2 + c2, or simply, 3 squared plus 4 squared equals 5 squared. Assuming the prime p had to be either a or b, and it can't be 4, then it must be 3. 3 squared plus 138 equals 147, divided by 4, gives the remainder 3.

Akash Deep
Jul 1, 2014

i f w e c o n s i d e r a p r i m e " p " t h e n t h e f o l l o w i n g c a s e s c a n o c c u r c a s e : 1 p 1 ( m o d 4 ) p 2 1 ( m o d 4 ) c a s e : 2 p 3 ( m o d 4 ) p 2 9 ( m o d 4 ) a n d 9 1 ( m o d 4 ) p 2 1 ( m o d 4 ) 138 2 ( m o d 4 ) p 2 + 138 3 ( m o d 4 ) h e n c e r e m a i n d e r 3 if\quad we\quad consider\quad a\quad prime\quad "p"\quad then\quad the\\ \quad following\quad cases\quad can\quad occur\\ case:1\quad \\ p\quad \equiv \quad 1\quad (mod\quad 4)\\ { p }^{ 2 }\quad \equiv \quad 1\quad (mod\quad 4)\\ case\quad :\quad 2\\ p\quad \equiv \quad 3\quad (mod\quad 4)\\ { p }^{ 2\quad }\equiv \quad 9\quad (mod\quad 4)\quad and\\ \quad 9\quad \equiv \quad 1\quad (mod\quad 4)\quad \\ { p }^{ 2 }\quad \equiv \quad 1\quad (mod\quad 4)\\ 138\quad \equiv \quad 2\quad (mod\quad 4)\quad \\ { p }^{ 2 }\quad +\quad 138\quad \equiv \quad 3\quad (mod\quad 4)\\ hence\quad remainder\quad 3

Brozen Hozen
Jun 18, 2014

Claim1: p 2 p \neq 2

Call the two positive integers a a and b b , then p = a 2 b 2 = ( a + b ) ( a b ) p = a^2 - b^2 = (a + b) (a - b) .

Since p is prime, then one of the two terms is p p , and the other is 1, since a b a-b is the smaller term, a b = 1 a - b = 1 and a + b = p a+b = p .

If p = 2 p = 2 then a = b = 1 a = b = 1 , but a b = 1 1 = 0 1 a - b = 1 - 1 = 0 \neq 1 , contradiction. Therefore p 2 p \neq 2 . QED

Claim 2: p % 4 = 1 p \% 4 = 1 or p % 4 = 3 p \% 4 = 3

Since p p is prime and p 2 p \neq 2 , then p % 4 0 p \% 4 \neq 0 and p % 2 0 p \% 2 \neq 0 , hence p % 4 2 p \% 4 \neq 2 .

This means that p % 4 = 1 p \% 4 = 1 OR p % 4 = 3 p \% 4 = 3 QED

Main Proof

Let r = p % 4 r = p \% 4 , so r = 1 r= 1 or r = 3 r = 3

Let p = k + r p = k + r . Note that k % 4 = 0 k \% 4 = 0 .

\(p^2 = (k + r)^2 = k^2 + 2kr + r^2

Since \(k \% 4 = 0\), k 2 % 4 = 0 k^2 \% 4 = 0 , and 2 k r % 4 = 0 2kr \% 4 = 0 . This leaves us with p 2 % 4 = 0 + 0 + r 2 p^2 \% 4 = 0 + 0 + r^2

If r = 1 r = 1 then r 2 % 4 = 1 % 4 = 1 r^2 \% 4 = 1 \% 4= 1

If r = 3 r = 3 then r 2 % 4 = 9 % 4 = 1 r^2 \% 4 = 9 \% 4= 1

Hence r 2 % 4 = 1 r^2 \% 4 = 1 always. Thus p 2 % 4 = 0 + 0 + 1 = 1 p^2 \% 4 = 0 + 0 + 1 = 1

Finally 138 % 4 = 2 138 \% 4 = 2 , and so ( p 2 + 138 ) % 4 = ( 1 + 2 ) % 4 = 3 (p^2 + 138) \% 4 = (1 + 2) \% 4 = 3

p is a prime number so it should be in the form 4n+1 or 4n+3 (numbers in the form 4n&4n+2 are multiples of 2) so p^2 should be in the form 4n+1 so the reminder is 1+2(2 is the reminder when 138 is divided by 4)

Will Kennett
Jun 12, 2014

its 3 because everythingis

2 pending reports

Vote up reports you agree with

×

Problem Loading...

Note Loading...

Set Loading...