Home > Just Math
Power to factorial (Posted on 2023-08-13) |
|
Find all non-negative integer solutions x,y,z,n that satisfy the equation
2x + 5y - 31z = n!
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:
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:
|