Determine the maximum value of a positive integer x that satisfies [x/2] + [x/3] + [x/11] + [x/13] < x, where [x] denotes the greatest integer ≤ x.
The sum of 1/2+1/3+1/11+1/13, the amount by which x is multiplied, is 859/858 ~= 1.0011655011655.
The most that the [], greatest integer or floor, function can reduce the overall total (not the multiplier) is 1/2+2/3+10/11+12/13 = 2573/858 ~=2.9988344988, or just less than 3.
The point at which the given less-than situation starts to become even theoretically possible (i.e., disregarding the actual reduction via the floor function) is when
x * 859/858 - 2573/858 >= x
x * (859/858 - 1) >= 2573/858
x / 858 >= 2573/858
So we need to test only those x's below 2573:
10 for X=2 to 2572
20 T=int(X/2)+int(X/3)+int(X/11)+int(X/13)
30 if T<X then print X,T
40 next
which finds the actual highest x is 1715, for which the total comes to 1714.
By the way, 858 is the first value of x where the sum actually exceeds x, rather than merely equalling it.
|
Posted by Charlie
on 2012-05-07 14:13:06 |