Newton is estimated to have spent more on occult things than astronomy.
Like many did, the appeal of 'mathematical divinity' was seen as a means to control the anti-religious enthusiasm with more 'rationed arguments for the divine'.