C8H18
Since it hasn't been otherwise specified, I will be making a few assumptions for this problem.
1. The mystery hydrocarbon is in the form of a chain of carbon atoms with each carbon atom not at the end of the chain linked via a single bond to 2 carbon atoms. Then there will be a hydrogen atom linked to every unused valiance bond for the carbon atoms.
2. Hydrogen will be assumed to have an atomic weight of 1 and carbon an atomic weight of 12.
If you contemplate assumption #1 above, you'll realize that there is 1 hydrogen atom at each end of the chain. Between those 2 hydrogen atoms will be multiple groups of a carbon atom linked to 2 hydrogen atoms. So if we use the variable C for the number of carbon atoms, the weight of the hydrocarbon is expressed by the equation:
W = C*(12+2)+2
W = C*14+2
So let's substitute 114 for W and calculate C
W = C*14+2
114 = C*14+2
112 = C*14
112/14 = C
8 = C
So we have 8 carbon atoms.
And therefore we have 2 + 2*8 = 2+16 = 18 hydrogen atoms.
Which means that the desired formula is C8H18