Finding primes fitting a certain algebraic relation.

In summary, the person found a solution to the problem by using q=\frac{nq+2-k+\sqrt{nq(nq+8-2k)+(k-2)^2}}{2}.
  • #1
chingel
307
23

Homework Statement


Find all the primes p and q such that [itex]p^2-p-1=q^3[/itex]

The Attempt at a Solution


Trying out the first prime number 2, it is clear that [itex]p>q[/itex] and that the difference is larger than 1. Then when factorizing it [itex]p^2-p=q^3+1[/itex] [itex]\Rightarrow[/itex] [itex]p(p-1)=(q+1)(q^2-q+1)[/itex], I get that p must divide [itex]q^2-q+1[/itex], since p is larger than q+1. However, these are all the observations I have made and I don't have a good idea how to continue. Hints are welcomed.

With some testing with my computer, I found a solution with 11 and 37 and no others in near sight.
 
Physics news on Phys.org
  • #2
q+1 must divide p-1.
 
  • #3
I tried taking p=k(q+1)+1, then I got a quadratic for q which gave me [itex]q=\frac{k^2+1+\sqrt{k^4+6k^2+4k-3}}{2}[/itex], from where I can notice that 3 is a working solution, giving q=11, but I'm not sure how to move forward.
 
  • #4
chingel said:
I tried taking p=k(q+1)+1, then I got a quadratic for q which gave me [itex]q=\frac{k^2+1+\sqrt{k^4+6k^2+4k-3}}{2}[/itex], from where I can notice that 3 is a working solution, giving q=11, but I'm not sure how to move forward.

What course are you taking or where did you find this problem? What you've got there is a elliptic curve in p and q. This subject is way beyond me, but smarter persons than I am can sometimes prove there are only a finite number of rational solutions. But the whole subject is not at all elementary. I've been groping around trying to find an easy approach and I'm about ready to give up. Any reason to believe there is one?
 
Last edited:
  • #5
  • #6
chingel said:
It should be a high school olympiad type problem. I got it on paper, but I was able to find a reference of it online, problem 4 at the beginning:

http://www.math.ust.hk/excalibur/v17_n2.pdf

Ok, so there must be a clever way that doesn't use any big guns. That's good to know.
 
  • #7
I got some clues from the person I got the problem from and I was then able to solve it. The key was that after you take [itex]p=k(q+1)+1[/itex] and substitute to get the quadratic for q, what you end up with is [itex]q^2-q(k^2+1)+(1-k^2-k)=0[/itex], from where it is important to notice that q must divide [itex](1-k^2-k)[/itex], or [itex]k^2+k-1=nq[/itex], where n is some integer. If I then substitute for k^2 in the big formula I got for q in the last post from the quadratic, I get [itex]q=\frac{nq+2-k+\sqrt{nq(nq+8-2k)+(k-2)^2}}{2}[/itex]. The expression under the radical is larger than [itex](k-2)^2[/itex]. Trying that k=1 or k=2 doesn't work, I then get that [itex]q>\frac{nq}{2}[/itex], which is only possible when n=1. Therefore [itex]k^2+k-1=q[/itex] in addition to the previous relation [itex]q=\frac{k^2+1+\sqrt{k^4+6k^2+4k-3}}{2}[/itex] and solving those two the only working solution is k=3, so the only primes are q=11 and p=37.
Instead of solving the third degree polynomial, I found it easier to use [itex]q=\frac{nq+2-k+\sqrt{nq(nq+8-2k)+(k-2)^2}}{2}[/itex] and substitute into it n=1 and [itex]k^2=q+1-k[/itex], which turned it into [itex]q=\frac{q+2-k+\sqrt{q^2-2qk+9q-5k+5}}{2}[/itex], which after squaring and substituting for k^2 once more turns it into [itex]4q(k-3)=0[/itex].
 
  • #8
chingel said:
I got some clues from the person I got the problem from and I was then able to solve it. The key was that after you take [itex]p=k(q+1)+1[/itex] and substitute to get the quadratic for q, what you end up with is [itex]q^2-q(k^2+1)+(1-k^2-k)=0[/itex], from where it is important to notice that q must divide [itex](1-k^2-k)[/itex], or [itex]k^2+k-1=nq[/itex], where n is some integer. If I then substitute for k^2 in the big formula I got for q in the last post from the quadratic, I get [itex]q=\frac{nq+2-k+\sqrt{nq(nq+8-2k)+(k-2)^2}}{2}[/itex]. The expression under the radical is larger than [itex](k-2)^2[/itex]. Trying that k=1 or k=2 doesn't work, I then get that [itex]q>\frac{nq}{2}[/itex], which is only possible when n=1. Therefore [itex]k^2+k-1=q[/itex] in addition to the previous relation [itex]q=\frac{k^2+1+\sqrt{k^4+6k^2+4k-3}}{2}[/itex] and solving those two the only working solution is k=3, so the only primes are q=11 and p=37.
Instead of solving the third degree polynomial, I found it easier to use [itex]q=\frac{nq+2-k+\sqrt{nq(nq+8-2k)+(k-2)^2}}{2}[/itex] and substitute into it n=1 and [itex]k^2=q+1-k[/itex], which turned it into [itex]q=\frac{q+2-k+\sqrt{q^2-2qk+9q-5k+5}}{2}[/itex], which after squaring and substituting for k^2 once more turns it into [itex]4q(k-3)=0[/itex].

Yep. That's sounds like an Olympiad solution alright. Nice job and thanks a lot for posting back!
 
  • #9
chingel said:
I tried taking p=k(q+1)+1, then I got a quadratic for q which gave me [itex]q=\frac{k^2+1+\sqrt{k^4+6k^2+4k-3}}{2}[/itex], from where I can notice that 3 is a working solution, giving q=11, but I'm not sure how to move forward.

k4+6k2+4k-3=(k2+3)2+4(k-3). It has to be perfect square and it is when k=3. The discriminant is monotonously increasing with k, and it is easy to show that can not be the square of natural numbers greater than k2+3.

ehild
 
  • #10
ehild said:
k4+6k2+4k-3=(k2+3)2+4(k-3). It has to be perfect square and it is when k=3. The discriminant is monotonously increasing with k, and it is easy to show that can not be the square of natural numbers greater than k2+3.

ehild

Now that solution I like! I figured it out how it worked a lot faster than the other one. Bravo.
 
  • #11
ehild said:
The discriminant is monotonously increasing with k, and it is easy to show that can not be the square of natural numbers greater than k2+3.

Suppose there is a natural number x, so as

((k2+3)+x)2=(k2+3)2+4(k-3)
This leads to the quadratic equation in k: 2xk2 -4k+(x2+6x+12)=0
The discriminant is D=16-8x(x2+6x+12) which can not be positive if x is a natural number. x must be zero.

ehild
 
  • #12
Thanks for the nice solution ehild.

Another solution, that doesn't solve a quadratic equation, based on an idea suggested to me (not my idea).

[itex]\frac{p-1}{q+1}=k[/itex], then also [itex]p-1=k(q+1)[/itex] and [itex]p=k(q+1)+1[/itex].

If you substitute p into [itex]p^2-p-1=q^3[/itex], you get [itex]q^2-q(k^2+1)+(1-k^2-k)=0[/itex], from where q must divide [itex]1-k^2-k[/itex], because when you divide the whole quadratic expression by q, the first term in the sum is an integer, the second is an integer and for the whole sum to be an integer, zero, the third must also be an integer, therefore [itex]k^2+k-1=nq[/itex] (switched signs so that n is positive).

Now from [itex]q^3=p^2-p-1>(p-1)^2=k^2(q+1)^2>k^2q^2[/itex], where I substituted (p-1) from above. Then [itex]q>k^2[/itex], also [itex]2q>2k^2>k^2+k-1[/itex]. Since [itex]k^2+k-1=nq[/itex][itex]\Rightarrow[/itex] [itex]2q>nq[/itex][itex]\Rightarrow n=1[/itex], so [itex]k^2+k-1=q[/itex], in addition to the previous [itex]q^2-q(k^2+1)+(1-k^2-k)=0[/itex].

Now substituting into [itex]q^2-q(k^2+1)+(1-k^2-k)=0[/itex] using [itex]k^2=q+1-k[/itex] and [itex]q=k^2+k-1[/itex][itex]\Rightarrow[/itex] [itex]q^2-q(k^2+1)+(1-k^2-k)=[/itex][itex]q(k^2+k-1)-q(k^2+1)+1-(q+1-k)-k=[/itex]
[itex]q(k^2+k-1)-q(k^2+1)-q=[/itex][itex]q(k^2+k-1-k^2-1-1)=q(k-3)=0[/itex][itex]\Rightarrow[/itex][itex]k=3[/itex]
 
  • #13
chingel said:
Now from [itex]q^3=p^2-p-1>(p-1)^2=k^2(q+1)^2>k^2q^2[/itex], where I substituted (p-1) from above. Then [itex]q>k^2[/itex], also [itex]2q>2k^2>k^2+k-1[/itex]. Since [itex]k^2+k-1=nq[/itex][itex]\Rightarrow[/itex] [itex]2q>nq[/itex][itex]\Rightarrow n=1[/itex], so [itex]k^2+k-1=q[/itex], in addition to the previous [itex]q^2-q(k^2+1)+(1-k^2-k)=0[/itex].

That was very clever! :cool:

chingel said:
Now substituting into [itex]q^2-q(k^2+1)+(1-k^2-k)=0[/itex] using [itex]k^2=q+1-k[/itex] and [itex]q=k^2+k-1[/itex][itex]\Rightarrow[/itex] [itex]q^2-q(k^2+1)+(1-k^2-k)=[/itex][itex]q(k^2+k-1)-q(k^2+1)+1-(q+1-k)-k=[/itex]
[itex]q(k^2+k-1)-q(k^2+1)-q=[/itex][itex]q(k^2+k-1-k^2-1-1)=q(k-3)=0[/itex][itex]\Rightarrow[/itex][itex]k=3[/itex]

I would substitute k2+k-1=q, so the quadratic equation for q becomes q2-(k2+1)q-q=0, that is q2-(k2+2)q -> q=k2+2.
q=k2+k-1=k2+2 ->k=3.:-p

ehild
 
  • #14
All the credit for the clever way of getting n=1 goes to the person who gave me the problem, I just shared it here.

Yes the other substitution is better, more clear and direct, I guess I have a weird inclination to always try to substitute for k^2 in this problem, heh, as it got me something I could work with under the square root previously.
 

Related to Finding primes fitting a certain algebraic relation.

1. How can we determine if a prime number fits a certain algebraic relation?

To determine if a prime number fits a certain algebraic relation, we can substitute the prime number into the algebraic expression and see if it satisfies the given condition. If the resulting value is a whole number and the prime number is the only possible solution, then it fits the algebraic relation.

2. What are some common algebraic relations that prime numbers can fit?

Some common algebraic relations that prime numbers can fit include quadratic equations, linear equations, and exponential equations. These relations involve finding a specific variable that satisfies the equation, and prime numbers can often be solutions.

3. Is there a pattern or method for finding primes that fit a certain algebraic relation?

There is no specific pattern or method for finding primes that fit a certain algebraic relation. However, there are various techniques and algorithms that can be used to search for and test potential solutions, such as the Sieve of Eratosthenes or Fermat's Little Theorem.

4. Can prime numbers fit multiple algebraic relations?

Yes, prime numbers can fit multiple algebraic relations. For example, a prime number can be a solution to both a quadratic equation and an exponential equation. However, not all prime numbers will fit every possible algebraic relation.

5. Are there any practical applications for finding primes that fit a certain algebraic relation?

Yes, there are several practical applications for finding primes that fit a certain algebraic relation. One example is in cryptography, where prime numbers are used as the basis for encryption algorithms. Finding primes that fit certain algebraic relations can also have implications in number theory and other areas of mathematics.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
4
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
976
  • Precalculus Mathematics Homework Help
Replies
13
Views
974
  • Precalculus Mathematics Homework Help
Replies
4
Views
1K
  • Precalculus Mathematics Homework Help
Replies
14
Views
1K
  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
  • Precalculus Mathematics Homework Help
Replies
11
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
663
  • Precalculus Mathematics Homework Help
Replies
5
Views
2K
Back
Top