Monday 18 April 2022

Factorions

Figure 1

On Chris Pickover's Twitter feed, I came across the factorion, a term he uses to describe numbers of the form 145 where 1! + 4! + 5! = 145. Figure 1 shows his tweet. He defines a factorion as a natural number that equals the sum of the factorials of its digits. There are only two of these: 145 and 40585. 

Drawing on an analogy to amicable numbers, Wikipedia introduces the term amicable factorions to describe a pair of numbers in which the factorial digit sum of one number equals the other number. The two such pairs of numbers are (871, 45361) and (872, 45362). 

871 --> 45361 --> 871

872 --> 45362 --> 872

Again, in keeping with the analogy to sociable numbers, Wikipedia introduces the term sociable factorians to describe numbers that eventually return to themselves after repeated applications of the factorial sum of digits. Examples are 169, 363601 and 1454 where:

169 --> 363601 --> 1454 --> 169

These three numbers can be said to have a cycle length of three and thus amicable factorions could be considered as sociable factorions with a cycle length of 2. Similarly factorians could be viewed as sociable factorions with a cycle length of 1.

Thus factorions of whatever ilk are few and far between. The list comprises only:

  • 145 factorion
  • 169 sociable factorion
  • 871 amicable factorion
  • 872 amicable factorion
  • 1454 sociable factorion
  • 40585 factorion
  • 45361 amicable factorion
  • 45362 amicable factorion
  • 363601 sociable factorion
Thus the largest factorion, 363601, has six digits. A factorion could, theoretically, have seven digits because the smallest seven digit number is 1,000,000 and the largest factorial digit sum of a seven digit number is 7 x 9! = 2,540,160. However, factorions of eight digits and beyond are not possible because the smallest eight digit number is 10,000,000 and the largest factorial digit sum of an eight digit number is 8 x 9! = 2,903,040. Let's not forget that 0! = 1 by the way.

The Wikipedia articles looks at the topic using more mathematical terminology and considers number bases other than 10 but I'll keep this post simple (and I'm feeling lazy). Here is permalink to the SageMath algorithm that generates the above list. Below I've embedded the SageMath code:

No comments:

Post a Comment