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

Home > Just Math
Power to factorial (Posted on 2023-08-13) Difficulty: 3 of 5
Find all non-negative integer solutions x,y,z,n that satisfy the equation

2x + 5y - 31z = n!

No Solution Yet Submitted by Danish Ahmed Khan    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Solutions; not certain if complete | Comment 1 of 3
(x,y,z,n,n!)
(0,0,0,0,1)
(1,0,0,2,2)
(1,1,0,3,6)
(3,2,1,2,2)
(5,0,1,2,2)
(5,1,1,3,6)

------------
def fact(n):
    if n == 1 or n == 0:
        return 1
    ans = 1
    for i in range(n):
        ans *= (i+1)
    return ans
factorials = [fact(i) for i in range(100)]
big = 100
print('(x,y,z,n,n!)')
for x in range(big):
    for y in range(big):
        for z in range(big):
            f = 2**x + 5**y - 31**z
            if f<1:
                continue
            if f in factorials:
                print('({},{},{},{},{})'.format(x,y,z,factorials.index(f),f))

  Posted by Larry on 2023-08-13 13:03:07
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 (0)
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