@bigdoggproblem said
Best I can do so far:
[hidden]p = 23; b = 78; a = 6083[/hidden]
That is the correct answer. I'm wondering if it is possible to find an analytic solution. It's possible to eliminate the quadratic factorization analytically, we have:
p³ = (b² + a) (b² - a)
So either p² = (b² + a) and p = (b² - a), or p³ = (b² + a) and b² = a + 1. We can eliminate the former case as follows. Adding the expressions for p² and p we have:
p² + p = 2b²
if p = 2 then we have b = sqrt(3), which is not an integer so p must be an odd prime.
Rearranging slightly we have:
p [(p + 1)/2] = b²
Since p > (p + 1)/2 the left hand side has a lone prime factor of p, but the right hand side is a quadratic and so the factors in its prime factorization must appear an even number of times, so by the fundamental theorem of arithmetic the expression cannot be true.
This leaves the case p³ = (b² + a) and b² = a + 1,
so:
p³ = 2b² - 1,
Brute force on a spreadsheet gave the same result as bigdoggproblem found above. The advantage with this is that a by hand solution becomes feasible if somewhat tedious.
On my spreadsheet:
The first column is b, numbering from 1 upwards.
The second column finds 2b² - 1 using the first column as an input.
The third column finds exp(ln(2b² - 1)/3)
The forth is the third column + 1, as a rounding error check.
The fifth and sixth columns round down to the nearest integer.
The seventh column looks to see if the third column equals either the fifth or the sixth columns and prints yes if it does.
I was told about this problem by a relative and so I don't know if the original setter was expecting an analytic solution. I wonder if it's possible to make analytical progress, beyond the above.