## sauravshakya 2 years ago Find all prime numbers "p", such that 8p+120 is a triangle number? I got only 2

1. UnkleRhaukus

*

2. sauravshakya

Let 8p+120 =n(n+1)/2 where n is a positive integer 16p+240 = n(n+1)

3. sauravshakya

Now, 2(8p+120) from here no solution as 2+1<120 4(4p+60) from here no solution as 4+1<60 8(2p+30) from here no solution as 8+1<30 16(p+15) here we have a solution when p=2 an i.e 16*17

4. sauravshakya

Similarly we can do p(16p +240/p) 2p(8p+120/p) . . .

5. sauravshakya

From there we get p can only be 1or 2 or 3 or 5 as 240 =2*2*2*2*3*5

6. sauravshakya

But when p=1 or 3 or 5 we will have no solution So, I got p=2 only

7. sauravshakya

Did I miss anything?

8. shubhamsrg

16p + 240 = n(n+1) p = n(n+1)/16 - 15 = n(n+1)/16 - (3*5) n(n+1) should be divisible by 16, it should not be odd, also , it should not have 3 or 5 as factor. So, n or n+1 should be prime, one is prime then the other should not be divisible by 3 or 5,n(n+1) should be divisible by 16, n(n+1)/16 should be even. => n(n+1) should be divisible by 32 , given 2 is excluded as our prime. n=16 fits 31 fits I see no other number till now, p=2 and p=47 seems legit at the moment.

9. shubhamsrg

Can anyone tell me why 256 fails this ? It follows all conditions !

not prime

11. shubhamsrg

n=256 = 32*8 256 *257/ 16 -15 =4097 = 17*241 => 2 different prime numbers.

12. shubhamsrg

but 257 is prime, 256 should have worked ?

13. shubhamsrg

352 also doesn't work, when simplified with n=352,we get 7751, which is 23*337, again a product of 2 primes !

14. shubhamsrg

Something is fishy, with my hypothesis .

15. shubhamsrg

exactly same is the case with 448 ! :|

16. ParthKohli

@sauravshakya brilliant.org?!

17. shubhamsrg

brilliant.org blocked me on fb! :P

18. ParthKohli

And there are only two primes that satisfy this condition: $$2$$ and $$47$$.

19. ParthKohli

Why, @shubhamsrg

20. ParthKohli

I had written a program to solve this, oh well.

21. shubhamsrg

They had asked something, I posted a very neat and good solution in the comments, explaining it pretty well. After 2-3 days, when I checked back, They had deleted my comment! :O I abused them! :P And now the consequences! :P

22. ParthKohli

You're such a genius heh :-)

23. shubhamsrg

Hell no! It was one of those rare moments when I was able to do some question. Hence I got too carried away when I came to know it wasn't there. B|

24. ParthKohli

This problem is from Brilliant.org by the way. Have you applied for the summer camp?

25. ParthKohli

@sauravshakya @shubhamsrg What are your profiles on there?

26. shubhamsrg

Well I haven't gone on brilliant.org till now I only liked it on fb . Nothing else.

27. ParthKohli

What will your age be in August?

28. sauravshakya

I just made a account yesterday

29. ParthKohli

Ah, that's bad. Students must be 13-17 for applying.

30. ParthKohli

A free trip to Stanford. =)

31. sauravshakya

I found some problem very interesting

32. sauravshakya

That was the only reason I made account

33. ParthKohli

I have done all problems except the last one.

34. sauravshakya

@ParthKohli did u get f(x)=-13+9x-3x^2+x^3 in the second last problem

35. ParthKohli

No, I did a little bit of hit-and-trial. :-)

36. ParthKohli

The maximum number that you could get from the set was $$44 +47 + 50 =141$$ and the least was $$24$$. Then I just randomly added some set elements and I observed that you always get a multiple of $$3$$ between $$24$$ and $$141$$.

37. ParthKohli

So I just counted the number of multiples of $$3$$ between $$24$$ and $$141$$... and voila!

38. ParthKohli

Do you guys want the formalized solution anyway?

39. ParthKohli

All the set elements are $$2$$ modulo $$3$$, and adding three numbers that are $$2$$ modulo $$3$$ gives us a number divisible by $$3$$.

40. ParthKohli

We can simply assert that all sums will be divisible by $$3$$, where the maximum is $$141$$ and the minimum is $$24$$.

41. ParthKohli

I could do better than that... but oh well.

42. mathslover

hey I had submitted a solution for this question @sauravshakya to brilliant.org let us see what happens. by the way it is a great site.

43. mathslover

Go for hit and trial method first. We have the first prime number as 2 : let us take p = 2 and see what we get : 8p + 120 = 8(2) + 120 = 16+120 = 136. Is 136 in the form of n(n+1)/2 ? Let us check it . n(n+1)/2 = 136 n(n+1) = 272 n^2 + n - 272 = 0 from this we get n = 16 and so we get : 16 * 17/2 = 136. That is 2 is our first prime number that satisfies the given equation : 8p + 120 . See, we know that a triangular number forms an equilateral triangle . i.e. 8p + 120 will form an equilateral triangle. We know that if n is a triangular number then 8n + 1 is a square ( find the proof here : http://nrich.maths.org/790&part=solution ) therefore we have : 8(8p + 120) + 1 is a square 64 p + 961 will be a square. Let the side of that square be a therefore we have : 64 p + 961 = a^2 a^2 - 961 = 64 p a^2 - 31^2 = 64p (a+31)(a-31) = 64p . We have : (a+31)(a-31) = 64p Let us first take a as odd Since a is odd therefore it must be in the form of 2k+1 ( k is even ) Therefore we have : (2k + 32)(2k – 30) = 64p (k + 16)(k – 15) = 16p Since k is even therefore it can be written in the form of $$2\lambda$$ $$(2\lambda + 16)(2\lambda – 15) = 16p$$ $$(\lambda+8) (2\lambda – 15) = 8p$$ Therefore $$8|\lambda +8$$ since 8 divides 8 and so it must divide also Therefore $$8| \lambda$$ or $$16|2\lambda$$ or $$16|k$$ (We have taken earlier as k = $$2\lambda$$) Since 16 divides k so we can write k as $$16\alpha$$ . Putting this in the equation : (2k+32)(2k-30) = 64p $$(2(16\alpha)+32)(2(16\alpha)-30) = 64p$$ $$(32\alpha+64)(32\alpha -30) = 64p$$ $$(\alpha+1)(16\alpha-15)=p$$ Oh! Here we have written a prime number ( p ) in the form of two composite numbers multiplication. But we have done everything right so there must be like : $$16\alpha – 15 = 1$$ and $$\alpha + 1 = p$$ Therefore $$alpha = 1$$ and p = 2 which we have already found. This means k is not in the form of $$2\lambda$$ Let us take it now as $$k = 2\delta + 1$$ We have : $$(k+16)(k-15) = 16p$$ - this we got earlier $$(2\delta+1 + 16)(2\delta +1 – 15) = 16p$$ $$(2\delta+17)(2\delta – 14) = 16p$$ $$(2\delta+17)(\delta – 7) = 8p$$ Since $$2\delta + 17$$ is odd ( since $$2\delta$$ is even and even + odd = odd ) therefore 8 must divide $$\delta-7$$ . Let us take $$\delta – 7$$ = $$8 \beta$$ $$\delta = 8\beta + 7$$ Since k = $$2\delta + 1$$ therefore we have : $$k = 2(8\beta +7)+1$$ and thus we get : $$(k+16)(k-15) = 16p$$ as : $$(16\beta + 31)(16\beta) = 16p$$ $$(16\beta + 31)(\beta) = p$$ Again we have p as the multiplication of two composite numbers . So it must be like $$\beta= 1$$ and $$16\beta+31 = p$$ Therefore $$\beta = 1$$ and $$16\beta + 31 = 16(1) + 31 = 16+31 = 47 = p$$ Therefore another prime number is 47 and so the sum of the prime numbers is 49 . ---**************************************---------------------------------------------------*****************************************