4.2.2 Exotic Definitions of Numbers

Here are some additional classifications of numbers, similar to what is found in Section 3.1.2:

  1. A happy number is a number whose sum of the squares of the individual digits eventually leads to a chain that terminates to 1. For example 19 is a happy number because 1912+92=8282+22=6862+82=10012+02+02=119 \Rightarrow 1^2 + 9^2 = 82 \Rightarrow 8^2 + 2^2 = 68 \Rightarrow 6^2 + 8^2 = 100 \Rightarrow 1^2 + 0^2 + 0^2 = 1. The first handful of happy numbers are 1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97, and 100.
  2. An extravagant/wasteful number is a number whose prime factorization has more digits than the number itself (treating both the base and exponents as individual digits). For example 18 is an extravagant number because 18=2×321818 = 2 \times 3^2 \Rightarrow 18 contains 2 digits and its prime factorization contains 3 digits. The first handful of extravagant numbers are 4, 6, 8, 9, 12, 18, 20, 22, 24, 26, 28, 30, 33, 34, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50.
  3. An economical/frugal number is the opposite of an extravagant number: its prime factorization contains less digits than the number itself. For example 128 is an economical number because 128=27128128 = 2^7 \Rightarrow 128 contains 3 digits and its prime factorization contains 2 digits. Unsurprisingly, cubes and higher powers of 2 and 3 are economical.
  4. An odious number is a non-negative number whose binary representation has an odd number of 1s. An example is 7=11127 = 111_2 which has 3 ones in its binary representation.
  5. An evil number is the opposite of an odious number: it has an even number of 1s. An example is 9=100129 = 1001_2 which has 2 ones.

You can find all these crazy definitions of numbers (and more!) from the On-Line Encyclopedia of Integer Sequences (OEIS). It’s a pretty cool resource that you can spend hours just browsing cool sequences of numbers.