(12C) Pell's Equation
07-07-2018, 05:16 AM (This post was last modified: 07-07-2018 05:21 AM by Gamo.)
Post: #1
 Gamo Senior Member Posts: 507 Joined: Dec 2016
(12C) Pell's Equation
Pell's equation (also called the Pellâ€“Fermat equation) is the equation of the form of

X^2 - nY^2 = 1

Where n is a given positive none square integer and integer solutions are sought for X and Y.

https://en.wikipedia.org/wiki/Pell%27s_equation

I personally make a note on this subject found on this MoHPC old forum and don't remember who posted this in the forum.
I found this very interesting and would like to share his clever program to solve this special equation.

Example: X^2 - (3)Y^2 = 1

3 R/S --> 2 X<>Y 1

Remark: The list of the possible n is shown in the Wikipedia link.

Program: Pell's Equation
Code:
 f 0 STO 0 SQRT STO 1 INTG STO 2 LSTx FRAC STO 3 1/x INTG STO 4 1 STO 5 STO 7 RCL 2 STO 6 RCL4 RCL 2 x RCL 5 + STO 2 RCL 1 / RND STO 7 RCL 3 1/x FRAC STO 3 1/x INTG STO 4 RCL 6 STO 5 RCL 2 ENTER x RCL 7 ENTER x RCL 0 x - 1 - X=0 GTO 51 GTO 16 RCL 7 RCL 2 GTO 00

Gamo
 « Next Oldest | Next Newest »

 Messages In This Thread (12C) Pell's Equation - Gamo - 07-07-2018 05:16 AM RE: (12C) Pell's Equation - Thomas Klemm - 07-07-2018, 09:29 AM RE: (12C) Pell's Equation - Dieter - 07-07-2018, 11:24 AM RE: (12C) Pell's Equation - Gamo - 07-08-2018, 10:51 AM RE: (12C) Pell's Equation - SlideRule - 07-11-2018, 02:49 PM

User(s) browsing this thread: 1 Guest(s)