Short & Sweet Math Challenge #21: Powers that be
|
11-10-2016, 05:47 PM
(This post was last modified: 11-10-2016 05:55 PM by J-F Garnier.)
Post: #25
|
|||
|
|||
RE: Short & Sweet Math Challenge #21: Powers that be
(11-09-2016 11:53 PM)Valentin Albillo Wrote: It was an interesting and fun challenge, and the opportunity for me to learn something in math. I have two comments: 1) It seems that your program doesn't explore all the polynomials. It uses basically the same algorithm that I used in my previous thread (based on Paul's idea), and I got not 41 but 48 constants. I had a look at your program, but had some difficulties to understand the logic of the polynomial scanning. However, I was able to hack your program to display all the tested polynomials, and indeed some are missing: ? 4 Sort by C,P ? p 1.00000000000 1 1.00000000000 x-1 1.00000000000 x^2+1 1.00000000000 x^2-1 1.00000000000 x^2-x+1 1.00000000000 x^2-x-1 1.00000000000 x^3+1 1.00000000000 x^3+x+1 1.00000000000 x^3+x-1 1.00000000000 x^3-1 1.00000000000 x^3-x+1 1.00000000000 x^3-x-1 1.00000000000 x^3-x^2+1 1.00000000000 x^3-x^2+x+1 1.00000000000 x^3-x^2+x-1 1.00000000000 x^3-x^2-1 1.00000000000 x^3-x^2-x+1 1.00000000000 x^3-x^2-x-1 1.00000000000 x^4+x-1 1.00000000000 x^4+x^2+x-1 1.00000000000 x^4+x^2-1 1.00000000000 x^4+x^2-x-1 1.00000000000 x^4-1 1.00000000000 x^4-x-1 1.00000000000 x^4-x^2+x-1 1.00000000000 x^4-x^2-1 1.00000000000 x^4-x^2-x-1 1.00000000000 x^4-x^3+x-1 1.00000000000 x^4-x^3+x^2+x-1 1.00000000000 x^4-x^3+x^2-1 1.00000000000 x^4-x^3+x^2-x-1 1.00000000000 x^4-x^3-1 1.00000000000 x^4-x^3-x-1 1.00000000000 x^4-x^3-x^2+x-1 1.00000000000 x^4-x^3-x^2-1 1.00000000000 x^4-x^3-x^2-x-1 36 For instance, the polynomials x^2+x+1 and x^2+x-1 are not tested, as well as the x^3+x^2... polynomials. 2) my second comment is what I already mentioned in my previous message: the value 1.75487766625, root of x^4-x^3-x^2-1, is not found by this algorithm, although its powers clearly tend to an integer (quite quickly actually): x^10 276.992792634 x^11 486.088465506 ... x^21 134643.001528 x^22 236281.996298 ... x^27 3932464.99924 x^28 6900995.00047 The roots of the polynomial x^4-x^3-x^2-1 are: (.122561166877,-.74486176662) (.122561166877,.74486176662) (-1,0) (1.75487766625,0) Clearly, the roots 1 or -1 should not cause to reject the polynomial under test, since powers of -1 or +1 will not impact the decimals of the powers. Thanks again for this challenge! J-F |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)