All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Pell's Equation (Posted on 2023-10-21) Difficulty: 3 of 5
Find positive integers X, Y and N satifying the Pell equation: X² - N*Y² = 1 such that X, Y and N together contain all of the decimal digits 0 to 9 exactly once.

Note: The solution is unique when X,Y,N > 1.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Computer solution | Comment 1 of 2
(X,Y,N) = (9801, 364, 725)
9801^2 -  725*364^2 = 1

program output:  9801 364 725

I have not ruled out other solutions, perhaps with N having fewer digits and X,Y having more than 4 digits.
-----------------
def issquare(n):
    """ Input an integer, Returns True iff it is a perfect square. """
    if round(n**0.5)**2 == n:
        return True
    else:
        return False

big = 1000
for n in range(1,big):
    for y in range(1,big):
        xsquared = 1 + n*y**2
        if issquare(xsquared):
            x = int(xsquared**.5)
            digits = str(x)+str(y)+str(n)
            if len(digits) != 10:
                continue
            if len(set(digits)) == 10:
                print(x, y, n)

  Posted by Larry on 2023-10-21 11:07:18
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information