Blah blah blah!!! not related to solution... So hid this part...
The solution is for not rational numbers but for natural numbers(as Nayel bhaiya said in the hint)... That problem was for BDMO 2010 Secondary 8 or 9 or 10th problem...
Let's consider 2 cases.a=b & a is not equal to b.(Actually Moon bhai gave me this start) consider two cases...
Let a=b,
Then $2p^a=n^2 $
Let's observe it.If we put p=3,5,7....odd
primes we won't be able to find any square number.But if we use
p=2,a=3,,5,7,9.....we will get a square number.That's the key.We
multiply the $2$ with $2,8,32$......I mean $2^1,2^3,2^5$.... That will give us $2^2,2^4,2^6$ which are squares...
so here p=2 and
a=positive odd.
So we get an answer.That p=2 and a,b=positive odd.a,b are the same odd number at one time
Now for a not equals to b... Now for our benefit we assume that a is less than b(b could be less than a,that does not make any difference as far as the above question concerned) Here we need to be tricky.
$p^a+p^a*p^b-a=p^a(1+p^b-a)=p^a(1+p^c) [let,b-a=c]$
As it equals to a square and
they both are relative primes,so they have to be square numbers themselves. That
means $p^a$ and $1+p^c$ are squares.Let
$1+p^c=x^2$
or,$p^c=x^2-1=(x+1)(x-1)$
Now take 2 cases.p odd and p even.
if p is odd.p=3.The reason is that
$p^c=(x+1)(x-1)$
As p^c is odd these both are odd too.their
gcd=1.
(For determining the smallest possible values)
And one of them can be 1.Clearly x-1=1 so,x=2 & x+1=3 that implies
p=3.c=1 now c=b-a=1 so,b=a+1 ....
we can see that a=even and b=the odd
next to a,I mean consequent number......
so p=3,a=2k and b=2k+1
Bingo!
Like it prove that for p even
In this case $2^c=(x+1)(x-1)....here gcd(x+1,x-1)=2$....
as 2^c is even these both are even too...one of them is even for sure... that makes the other an even number...as their difference is 2...that's why here gcd=2.
now considering lowest values
$x-1=2,x=3,b-a=3,b=a+3$ so here p=2,a=2k,b=2k+3 here k belongs to N as a,b belongs to N.
Bingo!We solved it.