# Find Solutions- Number Theory

1. Apr 26, 2007

### Gib Z

This isn't homework, but an interest question I found on the web. I can't solve it though...

Let $p$ be an odd prime. Determine all pairs $(m,n)$ where m and n are positive integers and satisfy the below:

$$(p-1)(p^n+1)=4m(m+1)$$.

I have done by some simple inspection that m must be odd, but I'm not sure that helps. Does anyone know any theorems that may help?

2. Apr 26, 2007

### Gib Z

I have made a tiny bit of progress I think.

I Make it a quadratic and solved:
$$m=\frac{-1\pm \sqrt{1-(p-1)(p^n+1)}}{2}$$.

Since m must be odd, 2m must be even. So the numerator must be even. So the square root must be odd. But for m to be an integer, the square root must also be an integer. So I get $1-(p-1)(p^n+1)$ must be a perfect square. How Do i continue?

EDIT: Looking again...that can't be right because (p-1)(p^n+1) must be less than one, or exactly 1. It can't be less than one for obvious reasons, and it can't be exactly 1 either.

EDIT2 : Solved quadratic wrong..Ill try again

Last edited: Apr 26, 2007
3. Apr 26, 2007

### Gib Z

Ok so the actual solution to the quadratic is
$$m=\frac{-1\pm \sqrt{1+(p-1)(p^n+1)}}{2}$$, sign error...

Well the numerator must be even, so the square root must be odd. So to be an integer, 1+(p-1)(p^n+1) must be the square of an odd number, so of the form (2k+1)^2 where k is some integer. So (p-1)(p^n+1)=4k^2+4k, so (p-1)(p^n+1) must be divisible by 4.

Can anyone help me from here?

4. Apr 26, 2007

### Gib Z

I Just realised now that I did Nothing. Nothing at all. The result I achieved can be done by dividing the original questions equation by 4...

5. Apr 26, 2007

### Office_Shredder

Staff Emeritus
Alternatively, p-1 is even, p^n + 1 is even, so it must be divisible by four. So the equation doesn't even force the issue, just the way that (p-1)(p^n + 1) works

6. Apr 26, 2007

### TripleS

where did u find it?

7. Apr 26, 2007

### Gib Z

It was on some other forums but no solution was found there either, and the thread was closed for some reason..

8. Apr 26, 2007

### Office_Shredder

Staff Emeritus
Well, solutions do exist (if p=5, m=2 n=1). Interestingly, this disproves your m is odd claim (which seemed, well... odd to me, considering m+1 would always be even then).

9. Apr 26, 2007

### mr200backstrok

how is m always odd?

$$(p-1)(p^n+1)=4m(m+1)$$

if p is odd, then p - 1 is even. since p^n is always odd (i checked it using a C++ program :) ), then the expression p^n - 1 is even. even times even is even. so, in order for the whole thing to be equal, the right side must be even. if you put m as even, then you get (even)*(odd) which equals even.If you put m as odd, then you still get an even right side.

10. Apr 27, 2007

### ramsey2879

I sometimes wonder whether the poster is playing games with his posts. Anyway, a solution for every odd prime is n = 1 and m = (p-1)/2 so m can be both odd or even. In fact this solution works for every odd composite p as well, but that is precluded in the statement of the problem.

11. May 4, 2007

### Gib Z

Jesus Christ..sorry I haven't replied guys But I worked out the full solution in case anyones interested :)

$$(p-1)(p^n+1)=4m(m+1)$$
$$p^{n+1}-p^n+p = 4m(m+1) + 1 = (2m+1)^2$$

Let k be some odd number, since of the form 2m+1

$$]p^{n+1}-p^n+p=k^2$$

For n=1, solving for m gives the solution given by ramsey. For n > 1, assume it has solutions. Then P divides K. Then divide both sides by p^2. That gives p^(n-1) - p^(n-3) + 1/(p) = k^2/(p^2) = (k/p)^2

Since it is implied P divides k, the RHS should be an integer, but the LHS is not. Done.