The purpose of this project is to computationally determine the approximate density of happy numbers among positive intergral numbers. The python script attached is capable of generating happy numbers infinitely.
The attached txt file contains a list of all the happy numbers up to 10 million The density was computed to be 14.18%.
References: Justin Gilmer wrote a paper in 2011 that proves that happy numbers have an upper density of at least 18% and a lower density of at most 12%. According to CORE, happy numbers have a lower density of 0.1138 and an upper density of 0.18577. However, Scientific American Blogs says that the asymptotic density of happiness does not exist. Wikipedia says that the 10-happy numbers do not have an asymptotic density.