Max Alekseyev on Mon, 14 Oct 2013 05:26:27 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: |
Hi Charles, Your equation is equivalent to (2y+1)^2 - 8x^2 = 8n+1 and you can use bnfisintnorm(bnfinit(z^2-8),8*n+1) to get basis solutions for (2y+1) and x as coefficients (up to a sign) of z^0 and z^1, respectively. E.g., for n=5, this gives [z + 7, 4*z + 13], the first one of which in particular gives (x,y) = (1,3). Regards, Max On Sun, Oct 13, 2013 at 11:02 PM, Charles Greathouse <charles.greathouse@case.edu> wrote: > I haven't dabbled with GP's algebraic functions very much. I recently came > across this problem: for which n is n plus a perfect square a triangular > number? That is, given an even number 2n, does the Diophantine equation > y^2 + y - 2x^2 = 2n > have a solution? > > I've only used qfbsolve and thue before, which of course don't apply here, > but I'm pretty sure this is implemented in PARI. Hint, anyone? > > Charles Greathouse > Analyst/Programmer > Case Western Reserve University