Given: The length of the solenoid coil is
The total number of turns is given as,
The formula for the magnetic force acting on the wire is given as,
Also force under gravitational pull from Newton’s law of motion is given as,
On comparing equation (1) and equation (2), we get
By substituting the given values in above equation, we get
Thus, the current flowing through the solenoid is