A floor function equation M421 in CRUX​
​by Shenghui Yang​
​Related ceiling function tower problem
V36 Mayhem 421 (2010) is quite interesting problem and we can study slightly more general cases with WL. Original question: Find the solution of
1
x
+
3
x
=4
for
x∈R

Analysis

It is straightforward to use the quick substitution
t
1
x
and make the equation a little easier to handle.
We can choose a proper visualization function to study the graph before we dig into the algebra. This usually gives us a good hint about the solution:
Plot[Floor[t]+Floor[3*t],{t,0,4},GridLines{Range[15]/3,{4}},​​Ticks->{Range[15]/3,Range[15]},ImagePadding{{10,0},{30,0}},ExclusionsStyle{{Red,Dashed},Blue}]
Out[]=
The important thing here are:
1
.
Vertical grid lines indicating the boundary of each possible solution for
1
x
+
3
x
=⌊t⌋+⌊3·t⌋=n
2
.
Some integers cannot be
n
on the RHS of the equation. For instance the graph shows there is no solution for
n3
,
n7
or
n11
Notice that these number are of the form
4k+3
. The reason is that if
tm+ϵ
, where
m
is the integer part of
t
and
ϵ
is the fractional part
ϵ∈[0,1)
. Then
⌊t⌋+⌊3·t⌋m+⌊3m+3ϵ⌋4m+⌊3ϵ⌋
The range of the floor function term is:
FunctionRange[{Floor[3*ϵ],0<=ϵ<1},ϵ,y]
Out[]=
y0||y1||y2
The range means only
{4·m+0,4·m+1,4·m+2}
are valid values on the RHS. The corresponding root for
m≤t<m+
1
3
,
m+
1
3
≤t<m+
2
3
and
m+
2
3
≤t<m+1
. In the original problem we let
m=1
and choose the first interval for t: [1,4/3). Thus
x
is in (3/4,1].
Reduce[{Floor[t]+Floor[t*3]==4,t==1/x},{x,t},Reals]
Out[]=
3
4
<x≤1&&t
1
x
Meanwhile, when
n=3
:
Reduce[{Floor[t]+Floor[t*3]==3},t,Reals]
Out[]=
False

Generalization:

For a more generalized form:
1
x
+
k
x
=n
, only
n∈{(1+k)·m+0,(1+k)·m+1,⋯,(1+k)·m+(k-1)}
works for
m∈N
and the corresponding intervals for x’s are
m+
i-1
k
≤
1
x
<m+
i
k
for
1≤i<k-1
.