Square numbers near 1871 (year of death)
40$\times$40 = 1600 too small
42$\times$42 = 1764, but if he was 42 in 1764 then by 1871 he was older than 140
43$\times$43 = 1849, 22 years before he died in 1871, which is reasonable
44$\times$44$\gt$1871 so there are no more possibilities
So he was born 43 years before 1849, in 1806