He lived from March 29 , 1790 to January 18 , 1862 . John Tyler , Jr. ( March 29 , 1790 - January 18 , 1862 ) was the tenth President of the United States ( 1841 â `` 1845 ) and the first to succeed to the office following the death of a predecessor .