cover image for post 'Project Euler Problem 438 – Integer Part of Polynomial Equation - Solutions'

Project Euler Problem 438 – Integer Part of Polynomial Equation - Solutions

Spoiler Alert! This blog entry contains content that might help you solve problem 438 of Project Euler. Please don’t read any further if you have yet to attempt to solve the problem on your own. The information is intended for those who failed to solve the problem and are looking for hints.

Test Data

Polynomials for n=4

Those are the 12 polynomials for n =4 mentioned in the problem statement:

x412x3+50x284x1+46x412x3+50x284x1+47x412x3+51x291x1+57x412x3+51x291x1+58x412x3+51x290x1+55x411x3+42x266x1+36x411x3+42x265x1+33x411x3+42x265x1+34x411x3+43x271x1+42x411x3+43x270x1+39x411x3+43x270x1+40x410x3+35x250x1+24

One of the Polynomials for n=7

x730x6+371x52449x4+9307x320334x2+23617x11236

Archived Comments

Note: I removed the Disqus integration in an effort to cut down on bloat. The following comments were retrieved with the export functionality of Disqus. If you have comments, please reach out to me by Twitter or email.

nobody Dec 21, 2014 01:39:29 UTC

There is no useful hint here. A dumb straighforward brute-force search allow to find the twelve polynomials.
But the same dumb approach isn't enough to solve this problem.

Moreover your polynomial of degree 7 isn't even irreducible.
Irreducible ones are harder to find.

nobody Dec 21, 2014 01:51:26 UTC

If you want twelve more of such polynomials of degree 7, take one by one the above polynomials and multiply by (x-5)(x-6)(x-7)

nobody Dec 21, 2014 01:55:40 UTC

You can build much more of such polynomials from the first twelve above if you think two minits.
The trick will not work to find some irreducible polynomials of degree 7 compliant.

Nobody2015 Dec 31, 2014 21:42:58 UTC

For polynomial of degree 4 a dumb approach is as follow:

Since x1<2,2x2<3,3x3<4,4x4<5 are roots. The corresponding symetric functions are such that:

14σ110
35σ271
154σ350
24σ4120

and:
x4σ1x3+σ2x2σ3x+σ4=(xx1)(xx2)(xx3)(xx4)
(values are obtained in developping of (x1)(x2)(x3)(x4) and (x2)(x3)(x4)(x5))

It makes possible the computation.

BUT, the same approach with degree 7 is dumb.