The term happy go lucky means cheerfully unconcerned about the future. A happy-go-lucky person does not plan much and accepts what happens without becoming worried. While we may not all be able to share in this happy state most of the time, we can at least enjoy happy go lucky days on a fairly regular basis.
If we consider our diurnal age, then on certain days our age in days will be what is termed a happy go lucky number. What criteria are used to determine such a number. Well, for a number to be happy, it must satisfy the criterion that repeated sums of squares of digits lead to 1. If it doesn't the number is destined to enter an endless loop. For a number, this is obviously not a happy situation because there is no finality or resolution to its predicament. I wrote about these in a post dated June 26th 2018.
The loop consists of the numbers 4, 16, 37, 58, 89, 145, 42 and 20 with 20 of course leading back to 4. Let's look at an example of an unhappy number. Tomorrow I'll be 26222 days old. That's a lot of 2's. Working with sums of squares of digits, we find that:$$ \begin{align}26222 \rightarrow 2^2+6^2+2^2+2^2+2^2 &=52\\52 \rightarrow 5^2+2^2&=29\\29 \rightarrow 2^2+9^2&=85\\85 \rightarrow 8^2+5^2&=89 \end{align}$$and we've entered the loop, although we knew that would happen at 85 because by reversing the digits we get 58 which is in the loop. However, today I'm 26221 days old and we find that:$$\begin{align} 26221 \rightarrow 2^2+6^2+2^+2^2+1^2&=49\\49 \rightarrow 4^2+9^2&=97\\97 \rightarrow 9^2+7^2&=130\\130 \rightarrow 1^2+3^2+0^2&=10\\10 \rightarrow 1^2+0^2&=1 \end{align}$$and we've reached 1. Thus 26221 is a happy number.
For a number to be lucky, it must avoid a savage cull. I wrote about lucky numbers in an eponymously titled post on December 4th 2016. I've also written about them in The Goldbach Conjecture and Lucky Numbers on November 26th 2019 and Generating Lucky Numbers in Python on June 15th 2018. The cull of the natural numbers involves deleting every second number (thus all even numbers disappear), then every third number, then every fourth number and so on. If a happy number turns out to be lucky as well, then it qualifies as a happy go lucky number.
26221 is the 409th happy go lucky number and so the density of such numbers is about 1.56%. In the millennium from 26000 to 27000, Figure 1 shows the only such numbers:
|
Figure 1 |
This represents a frequency of 1.4% which is close to the earliest quoted figure of 1.56%. However, after reading this
Scientific American article, I discovered that there is no asymptotic density for the happy numbers. To quote from the article:
... the lower density of the happy numbers is below 12 percent and the upper density is above 18 percent. The fact that happy numbers do not have a defined asymptotic density means there are parts of the number line that have more happiness concentrated in them than others.
The lucky numbers however, do have an asymptotic density which is the same as that of the prime numbers, namely:$$\frac{1}{\log{n}}$$So do the happy go lucky numbers have an asymptotic density? It would appear not because they will have an upper and lower density just as the happy numbers do, so density ranges from:$$ \frac{12}{\log{n}} \rightarrow \frac{18}{\log{n}} $$ So when \(n=26221\), the density range is from \(1.18 \%\) to \(1.77 \% \) with an average of \(1.48 \%\) which is around what we found earlier. The paper in which Justin Gilmer proves his result can be found
here.