Find all positive integers x such that ⌊x/5⌋-⌊x/7⌋=1.
Suppose for a moment that there was no greatest integer involved:
x/5 - x/7 = 1
7x - 5x = 35
x = 35/2
The floor function can change each term by an amount between 0 and 1. So we should be able to put upper and lower bounds on the possible values of x.
Rewrite the equation without ⌊ ⌋ but with RHS = 0 and 2 instead of 1.
x/5-x/7=0 --> x=0 lower bound on x (or actually 1 since x must be positive)
x/5-x/7=2 --> x=35 upper bound on x.
So I expect no solutions > 35
Nevertheless I ran my short program much higher.
ans = []
for n in range(1, 1000000):
if int(n/5) - int(n/7) == 1:
ans.append(n)
print(ans)
Output:
[5, 6, 10, 11, 12, 13, 15, 16, 17, 18, 19, 21, 22, 23, 24, 28, 29]
|
Posted by Larry
on 2024-05-16 09:52:39 |