Find all positive numbers x such that
1 1 1
--- - ---- = ----
[x] [2x] 6{x}
where [x] represents the integer part of x and {x}=x-[x].
The below is wrong. The integer part of 2x is not the same as 2 times the integer part, which this had implicitly assumed.
The way I read this it's that the integer part of x is just floor(x) and {x} is the fractional part.
The x variable in the program below is just the integer part:
clc
for x=1:10000
rhs=1/x-1/(2*x);
f=1/(rhs*6);
if f<1
disp([x+f])
end
end
The program figures out what the fractional part must be. If the fractional part is 1 or larger it's not a fractional part.
The only two solutions found are
1.33333333333333
2.66666666666667
or 4/3 and 8/3.
Edited on March 11, 2025, 7:27 am
|
Posted by Charlie
on 2025-03-10 13:31:10 |