We are to find all prime numbers p,q such that
p(p4+p2+10q)=q(q2+3).
First, note that both sides are positive for positive primes p,q.
Let us analyze the equation:
p(p4+p2+10q)=q(q2+3).
Expand the left side:
p5+p3+10pq=q3+3q.
Bring all terms to one side:
p5+p3+10pq−q3−3q=0.
Group terms:
p5+p3+10pq−q3−3q=0.
Let us try small values for p.
Try p=2:
2(24+22+10q)=q(q2+3)
2(16+4+10q)=q(q2+3)
2(20+10q)=q(q2+3)
40+20q=q3+3q
40+20q−q3−3q=0
40+17q−q3=0
q3−17q−40=0
Try small prime values for q:
- q=2: 8−34−40=−66
- q=3: 27−51−40=−64
- q=5: 125−85−40=0
So q=5 works with p=2.
Now try p=3:
3(34+32+10q)=q(q2+3)
3(81+9+10q)=q(q2+3)
3(90+10q)=q(q2+3)
270+30q=q3+3q
270+30q−q3−3q=0
270+27q−q3=0
q3−27q−270=0
Try small prime values for q:
- q=2: 8−54−270=−316
- q=3: 27−81−270=−324
- q=5: 125−135−270=−280
- q=7: 343−189−270=−116
- q=11: 1331−297−270=764
- q=13: 2197−351−270=1576
No solution for p=3 and small q.
Try q=2:
p(p4+p2+20)=2(4+3)=14
Try p=2: 2(16+4+20)=2(40)=80=14
Try p=3: 3(81+9+20)=3(110)=330=14
Try q=3:
p(p4+p2+30)=3(9+3)=36
Try p=2: 2(16+4+30)=2(50)=100=36
Try p=3: 3(81+9+30)=3(120)=360=36
Try q=5:
p(p4+p2+50)=5(25+3)=140
Try p=2: 2(16+4+50)=2(70)=140
So p=2, q=5 is a solution (already found).
Try q=7:
p(p4+p2+70)=7(49+3)=364
Try p=2: 2(16+4+70)=2(90)=180=364
Try p=3: 3(81+9+70)=3(160)=480=364
Try q=11:
p(p4+p2+110)=11(121+3)=1364
Try p=2: 2(16+4+110)=2(130)=260=1364
Try p=3: 3(81+9+110)=3(200)=600=1364
Now, consider the degree of the equation. For large p, the left side grows much faster than the right side, so only small values are possible.
Now, check for p=q:
p(p4+p2+10p)=p(p2+3)
p5+p3+10p2=p3+3p
p5+10p2=3p
p5+10p2−3p=0
p(p4+10p−3)=0
So p=0 or p4+10p−3=0, which has no positive integer solution for p.
Now, try to check modulo 3 for possible contradictions for p>3:
If p>3, p is odd and p≡1 or 2(mod3).
Compute p(p4+p2+10q)(mod3):
- p4≡1(mod3) if p≡0(mod3)
- p2≡1(mod3)
- 10q≡q(mod3)
So p4+p2+10q≡1+1+q=q+2(mod3)
So p(p4+p2+10q)≡p(q+2)(mod3)
The right side: q(q2+3)≡q(q2)≡q3(mod3)
But for q≡0(mod3), q3≡q(mod3)
So q(q2+3)≡q(mod3)
So p(q+2)≡q(mod3)
If p≡1(mod3): q+2≡q(mod3)⟹2≡0(mod3), contradiction.
If p≡2(mod3): 2(q+2)≡q(mod3)⟹2q+4≡q(mod3)⟹q+1≡0(mod3)⟹q≡2(mod3)
But q is a prime >3, so q≡1 or 2(mod3).
Try q=2:
But q=2 already checked.
Thus, for p>3, there is a contradiction modulo 3.
Therefore, the only possible values are p=2 or p=3.
For p=2, q=5 is a solution.
For p=3, as above, q3−27q−270=0 has no integer solution for q.
Therefore, the only solution is (p,q)=(2,5).
Answer: The only pair of prime numbers p,q satisfying the equation is (p,q)=(2,5).