Close

Pell's Equation

Finds the fundamental solution of the Pell equation $x^2 - dy^2 = 1$. Where d is a nonsquare positive integer.

API

Endpoint
https://pebbles.cc/api/pells-equation
Parameters

Send a request with the following parameters:

apikey - Your API key

number - The number, d, a positive integer.

Response

The API returns a JSON object containing the fields status and output.

When the operation is successful, status has a value of "success", and output holds the result of the operation - a comma seperated list of the two fundamental solutions(x, y, in that order).

When there is an error in the operation, status has a value of "error", and output holds the error message(s). Multiple error messages are seperated with a "|".

Examples

{ "status" : "success", "output" : "33, 8" }

{ "status" : "error", "output" : "Invalid input | API key not stated" }