Let the number be x.
According to the question,
2(x+1x)=4
x+1x=42
x2+1x=2
x2+1=2x
x2+1−2x=0
(x−1)2=0
x−1=0
x=1
Hence, the number is 1.