Divisible by 6

Let p , q p,q be two prime numbers such that 6 p q + ( p + 1 ) ( q + 1 ) ( p + q ) 6\mid pq+(p+1)(q+1)(p+q)

If ( p , q ) = ( p 1 , q 1 ) , ( p 2 , q 2 ) , , ( p n , q n ) (p,q)=(p_1,q_1),(p_2,q_2),\ldots, (p_n,q_n) are all solutions for the ordered pair ( p , q ) (p,q) then find i = 1 n p i + q i . \sum_{i=1}^np_i+q_i.


The answer is 10.

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.

11 solutions

Pranjal Jain
Feb 20, 2015

Consider 3 cases, when both of them are two, when exactly one of them is 2, and when none is 2.

Case 1: 2 × 2 + 3 × 3 × 4 = 40 2×2+3×3×4=40 which is not divisible by 6 6

Case 2: 2 q + 3 × ( q + 1 ) × ( q + 2 ) 2q+3×(q+1)×(q+2) now, since latter term is divisible by 6 6 , 2 q 2q must be divisible by 6 6 , thus q = 3 q=3 .

Case 3: Note that both are odd in this case, thus former term is odd while latter is even, thus it cannot be divisible by 6 6 .

So only possible solution(s) are from case 2, (2,3) and (3,2)

Hence 2 + 3 + 3 + 2 = 10 2+3+3+2=10

short and sweet :)

Calvin Lin Staff - 6 years, 3 months ago

Except 2, all primes are odd. The problem has two parts. (a) pq ....... (b)(p+1)(q+1)(p+q) Assume p=q=2. We get 4+ 3*3*4 not divisible by 6. At least one of p or q has to be odd , p+1 or q+1 of (b) is even, and 6 is even. So (a) has to be even. Thus p ( or q) has to be eqal to 2. p = 2 , t h e E x p . i s = 2 q + 3 ( q + 1 ) ( q + 2 ) = 2 q + 3 q 2 + 9 q + 6 q { 3 q + 11 } + 6. Though 3q+11 is even it is not divisible by 3. If q=3 then only the expression would be divisible by 6. So we have (2,3) or (3,2). \text{Except 2, all primes are odd. The problem has two parts. } \\ \text{ (a) pq ....... (b)(p+1)(q+1)(p+q) } \\ \text{ Assume p=q=2. We get 4+ 3*3*4 not divisible by 6.}\\ \therefore \text{ At least one of p or q has to be odd , p+1 or q+1 of (b) is even,} \\ \text{and 6 is even. So (a) has to be even. Thus p ( or q) has to be eqal to 2.}\\ p=2, ~the~Exp.~ is~=2q+3*(q +1)*(q+2) =2q+ 3q^2+9q +6 \\ \implies q\{3q+11\}+6.\text{ Though 3q+11 is even it is not divisible by 3. }\\ \therefore \text{ If q=3 then only the expression would be divisible by 6.} \\ \text{So we have (2,3) or (3,2).}

I got (2,3) but missed (3,2) !!

Niranjan Khanderia - 6 years, 3 months ago

Log in to reply

I missed (3,2) on the first time too!!

展豪 張 - 5 years, 3 months ago

Log in to reply

Me too same solution and same mistake haha

Prince Loomba - 4 years, 9 months ago

Can You explain me Case II ? And how 'latter' term is divisible by 6 with the conclusion that q = 3 q = 3 is only possible.

Vishal Yadav - 5 years, 7 months ago

Log in to reply

Latter term is 3 × ( q + 1 ) × ( q + 2 ) 3\times (q+1) \times (q+2) . Now since one of q + 1 q+1 and q + 2 q+2 will be divisible by 2 2 , the term is divisible by 6 6 (Already a multiple of 3 3 ). Hence, 2 q 2q must also be divisible by 6 6 or q q must be divisible by 3 3 . Since we are given that q q is prime, q q must be 3 3 .

Pranjal Jain - 5 years, 7 months ago

Log in to reply

Short and Sweet ;lol

Vishal Yadav - 5 years, 7 months ago

Exactly Same Way.

Kushagra Sahni - 5 years, 4 months ago

Same way, pretty easy, shouldn't be level 4

Konstantin Zeis - 4 years, 6 months ago
Daniel Liu
Feb 19, 2015

First assume p , q > 3 p,q > 3 . In that case, then p , q 1 , 5 ( m o d 6 ) p,q\equiv 1,5\pmod{6} because they are primes.

This tells us that p q 1 , 1 ( m o d 6 ) pq\equiv -1, 1 \pmod{6}

However, note that if either of p , q 5 ( m o d 6 ) p,q\equiv 5\pmod{6} , then ( p + 1 ) ( q + 1 ) ( p + q ) 0 ( m o d 6 ) (p+1)(q+1)(p+q)\equiv 0\pmod{6} but in conjunction with p q 1 , 1 ( m o d 6 ) pq\equiv -1, 1\pmod{6} we know that p q + ( p + 1 ) ( q + 1 ) ( p + q ) ≢ 0 ( m o d 6 ) pq+(p+1)(q+1)(p+q)\not\equiv 0\pmod{6}

Thus, at least one of p , q p,q is 3 \le 3 . Let's take this by cases.

First case: WLOG let p = 2 p=2 . Then p q + ( p + 1 ) ( q + 1 ) ( p + q ) = 2 q + 3 ( q + 1 ) ( q + 2 ) pq+(p+1)(q+1)(p+q)=2q+3(q+1)(q+2)

Since 2 ( q + 1 ) ( q + 2 ) 2\mid (q+1)(q+2) , then 6 3 ( q + 1 ) ( q + 2 ) 6\mid 3(q+1)(q+2) so we need 6 2 q 6\mid 2q which forces q = 3 q=3 . This gives ( p , q ) = ( 2 , 3 ) (p,q)=(2,3) as one solution.

Second case: WLOG let p = 3 p=3 . Then p q + ( p + 1 ) ( q + 1 ) ( p + q ) = 3 q + 4 ( q + 1 ) ( q + 3 ) pq+(p+1)(q+1)(p+q)=3q+4(q+1)(q+3)

If q > 2 q > 2 , then 3 q 3q is odd. 4 ( q + 1 ) ( q + 3 ) 4(q+1)(q+3) is obviously even, so 3 q + 4 ( q + 1 ) ( q + 3 ) 3q+4(q+1)(q+3) is odd overall. But this means that it is not dividible by 6 6 . Thus, q = 2 q=2 is a possible answer. Indeed, plugging in q = 2 q=2 gives 6 66 6\mid 66 , a true statement. This gives the second solution, ( p , q ) = ( 3 , 2 ) (p,q)=(3,2)

Thus, our answer is 2 + 3 + 3 + 2 = 10 2+3+3+2=\boxed{10}


Perhaps an easier solution is as follows:

Note that p q + ( p + 1 ) ( q + 1 ) ( p + q ) = ( p q + p + q ) ( p + q + 1 ) pq+(p+1)(q+1)(p+q)=(pq+p+q)(p+q+1) . If one of the variables isn't equal to 2 2 , then p q + p + q pq+p+q is odd, p + q + 1 p+q+1 is odd, so ( p q + p + q ) ( p + q + 1 ) (pq+p+q)(p+q+1) is odd, therefore not divisible by 6 6 . Thus, one of the primes is 2 2 . WLOG let p = 2 p=2 . Then our expression turns into ( 3 q + 2 ) ( q + 3 ) (3q+2)(q+3) . if q = 2 q=2 , then the expression is 40 40 which is not divisible by 6 6 . Then, we know that q + 3 q+3 is even and 3 q + 2 3q+2 is odd. Thus, either 6 q + 3 6\mid q+3 or 2 q + 3 and 3 3 q + 2 2\mid q+3\text{ and }3\mid 3q+2 . Then second case is absurd since 3 3 q + 2 3\mid 3q+2 is impossible, so we must have 6 q + 3 6\mid q+3 which forces q = 3 q=3 .

Thus, our solutions are ( p , q ) = ( 2 , 3 ) or ( 3 , 2 ) (p,q)=(2,3)\text{ or }(3,2)

I did by ur second method and got (2,3) as a solution but forgot (3,2) is also one

Aditya Kumar - 5 years ago

I also did the second method

Subhra Patra - 4 years, 5 months ago
Adarsh Kumar
Feb 19, 2015

Let us first assume that p , q p,q are both odd numbers then,we see that p q + [ p + 1 ] [ q + 1 ] [ p + q ] pq+[p+1][q+1][p+q] would be odd.But 6 6 can't divide an odd number,thus,one of p , q p,q is 2 2 .First,let us take that p = 2 p=2 .By putting p = 2 p=2 the given expression becomes, 2 q + 3 [ q + 1 ] [ 2 + q ] . . . . . . . . . . . . . . . . . . . . . . . [ 1 ] 2q+3[q+1][2+q].......................[1] .Now,we see that both p p and q q can't be equal to 2 2 .Thus, q q is an odd number,say 2 x + 1 2x+1 .Putting this value in [ 1 ] [1] we get, 2 [ 2 x + 1 ] + 3 [ 2 x + 2 ] [ 2 x + 3 ] = 2 [ 2 x + 1 ] + 6 [ x + 1 ] [ 2 x + 3 ] 2[2x+1]+3[2x+2][2x+3]\\ =2[2x+1]+6[x+1][2x+3] .This implies that 6 6 should just divide 2 [ 2 x + 1 ] 2[2x+1] which implies that 2 x + 1 2x+1 should be divisible by 3 3 .But this can only happen when 2 x + 1 = 3 2x+1=3 as it is a prime.Thus, p = 2 p=2 and q = 3 q=3 .But,there is one more solution which is q = 2 q=2 and p = 3 p=3 .Thus,sum = 10 =10 .

Jason Martin
Mar 12, 2015

We first factor the expression as 6 6 divides ( p q + p + q ) ( p + q + 1 ) = A B (pq+p+q)\cdot(p+q+1)=A\cdot B . Now it's clear that A A can only be even when p = q = 2 p=q=2 , which is not a solution. So B B must be even. If p = 2 p=2 and q q is odd, then A B = ( 3 q + 2 ) ( q + 3 ) = 2 q = 0 A\cdot B=(3q+2)\cdot(q+3)=2q=0 mod 3 3 , so q = 3 q=3 . Thus, ( 2 , 3 ) (2,3) and ( 3 , 2 ) (3,2) are solutions. Finally, we cannot have both p p and q q odd, for then B B would be odd. Therefore, we have ( 2 + 3 ) + ( 3 + 2 ) = 10 (2+3)+(3+2)=\boxed{10} .

I liked this solution.

Silas Hundt Staff - 5 years, 10 months ago

Whatever 21
Feb 23, 2015

If either p or q or both p and q are odd then the answer will be odd and not divisible by 6. So at least one of them needs to be even. So one of them needs to be 2. We can write : 2 q 6 + 3 ( q + 1 ) ( 2 + q ) 6 \frac { 2q }{ 6 } +\frac { 3(q+1)(2+q) }{ 6 } = q 3 + ( q + 1 ) ( 2 + q ) 2 \frac { q }{ 3 } +\frac { (q+1)(2+q) }{ 2 } Now (q+1)(2+q) can be divisible by 2 for any value of q . But for q 3 \frac { q }{ 3 } to be an integer q needs to be divisible by 3 . So q can only be 3 . As we can interchange the values of q and p we got two solutions of (p,q) . (2,3) and (3,2) .

Hence 2+3+3+2=10

This was a fairly easy question.

Any prime number divided by 6, will leave a remainder of 2, 3, 1 or -1 Now, we can straight away eliminate the prime numbers which leaves a remainder of -1

As (-1+1) would be equal to 0, making the second product divisible by 6; but the first product can't be divisible by 6 in this case as only -1*0 can give us a remainder of 0 and no prime number divided by 6 has a remainder of 0. Thus, we can straight eliminate all the prime numbers which leaves a remainder of -1 when divided by 6

So we can check the remaining cases:

2 3 + ( 2 + 1 ) ( 3 + 1 ) ( 2 + 3 ) 2*3 + (2+1)*(3+1)*(2+3) is divisible by 6

2 1 + ( 2 + 1 ) ( 1 + 1 ) ( 2 + 1 ) 2*1 + (2+1)*(1+1)*(2+1) isn't divisible by 6

3 1 + ( 3 + 1 ) ( 1 + 1 ) ( 3 + 1 ) 3*1 + (3+1)*(1+1)*(3+1) isn't divisible by 6

So, the only possible pair of values would be which leaves remainders 2 & 3 when divided by 6, which are 2 & 3

As, we are looking for ordered pairs, we have two possible pairs (2,3) and (3,2) Adding all of which we have the answer as 10

First, let x = p + q x=p+q . Substituting, we get: p q + ( p + 1 ) ( q + 1 ) ( p + q ) = ( x + 1 ) ( x + p q ) pq+(p+1)(q+1)(p+q)=(x+1)(x+pq)

Case 1: q = 2 q=2 ( x + 1 ) ( x + p q ) = ( p + 3 ) ( 2 p + p + 2 ) = ( p + 3 ) ( 3 p + 2 ) (x+1)(x+pq)=(p+3)(2p+p+2)=(p+3)(3p+2) It is easy to see that 6 3 p + 3 6 \nmid 3p+3 . This implies that 6 p + 3 6 \mid p+3 . We get: p + 3 = 6 k p = 6 k 3 = 3 ( 2 k 1 ) p+3=6k \Rightarrow p=6k-3=3(2k-1) The only way this can be true is if p = 3 p=3

Case 2: p = 2 p=2

With similar logic to case 1 we get q = 3 q=3

Case 3: p 2 q p \ne 2 \ne q

Since p p and q q are odd:

  • x + 1 = p + q + 1 x+1=p+q+1 is odd

  • p q pq is odd

  • p q + x pq+x is odd

Therefore ( x + 1 ) ( p q + x ) (x+1)(pq+x) is odd and therefore indivisible by 6.

So ( p , q ) { ( 2 , 3 ) , ( 3 , 2 ) } (p,q) \in \{(2,3),(3,2)\} and the required sum is 2 + 3 + 3 + 2 = 10 2+3+3+2=\boxed{10}

Manole Buican
Feb 10, 2016

Let's suppose that p,q>2. Then p,q are odd, the (p+1)(q+1)(p+q) is even and pq is odd. So 6 | an odd number (impossible). Thus one of p or q should be 2. Let's suppose, without losing the generality - the expression is simmetric - that q=2. Then 6 | 2q + 3(p + 1)(p + 2) = 3p^2 + 11p + 6 => 6 | p(3p + 11). That means 3 | p(3p + 11) => 3 | p or 3 | 3p+11. But 3 | 3p + 11 is impossible, so 3 | p => p = 3. Thus, the pairs are (2, 3) and (3, 2) => the asked sum is 10.

Ritwic Majumder
Dec 31, 2015

Curtis Clement
Feb 21, 2015

Step 1: p , q ≢ 1 m o d ( 6 ) p,q\not\equiv -1 mod(6) otherwise pq will leave a remainder of ± \pm 1 whilst the rest will leave a remainder of 0. Step 2: p , q 1 m o d ( 6 ) p q + ( p + 1 ) ( q + 1 ) ( p + q ) 3 ≢ 0 m o d ( 6 ) p,q\equiv1mod(6) \Rightarrow\ pq + (p+1)(q+1)(p+q)\equiv3\not\equiv0 mod(6) Step 3: Now we must test the other primes, namely 2 and 3: p ≢ q m o d ( 6 ) a s 2 p 3 + 5 p 2 + 2 p ≢ 0 m o d ( 6 ) p\not\equiv\ qmod(6) \ as \ 2p^3 + 5p^2 +2p\not\equiv 0mod(6) (because even + odd + even = odd and I substituted p = q) Step 4: p = 2 a n d q = 3 \large p = 2 \ and \ q =3 ... p q + ( p + 1 ) ( q + 1 ) ( p + q ) = 66 0 m o d ( 6 ) pq + (p+1)(q+1)(p+q) = 66\equiv0 mod(6) Finally the same is true if we swap the values of p and q. i = 1 n p i + q i = 2 + 3 + 3 + 2 = 10 \large \therefore\displaystyle\sum_{i=1}^{n} p_i + q_i = 2+3+3+2 = \boxed{10}

We have a problem here with notation. My understanding is that '|' means 'is exactly divisible by' and so the smallest prime is 2 and the smallest value for pq+(p+1)(q+1)(p+q) is 40. Now 6 is not divisible by 40 so the answer is 0.

John Pickering - 6 years, 3 months ago

Log in to reply

I'm not sure what you are trying to say. I agree that ( 2 , 2 ) (2, 2) is not a solution to the problem. The solutions are ( 2 , 3 ) (2,3) and ( 3 , 2 ) (3, 2) .

Calvin Lin Staff - 5 years, 7 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...