Cool fact about number of digits in n!

Click For Summary

Discussion Overview

The discussion revolves around the properties of factorials and powers in relation to the number of digits they contain. Participants explore the specific cases where the number of digits in n! equals n, as well as similar properties for expressions like n^n, considering various number bases and seeking patterns or expressions that yield specific digit counts.

Discussion Character

  • Exploratory, Technical explanation, Conceptual clarification, Debate/contested

Main Points Raised

  • One participant notes that there are only four natural numbers (1, 22, 23, 24) for which n = digits_in(n!), highlighting that 25 and larger numbers do not satisfy this condition.
  • Another participant suggests exploring the behavior of digit counts in different bases, such as 2, 3, 5, and powers of 2.
  • A participant shares their findings on the expression n^n, noting that only 1, 8, and 9 satisfy n = digits_in(n^n) within their tested range, expressing confidence that no other numbers will meet this criterion.
  • One participant expresses a desire to find a simple expression that increases the number of digits with an average increment of +1, indicating a search for a more generalized pattern.
  • A later reply questions the understanding of logarithms in relation to the discussion, suggesting a potential avenue for further exploration.

Areas of Agreement / Disagreement

Participants present various ideas and findings, but there is no consensus on a single expression or method that satisfies the conditions discussed. Multiple competing views and approaches remain evident.

Contextual Notes

The discussion includes assumptions about the behavior of digit counts in factorials and powers, but lacks formal proofs or comprehensive exploration of all potential cases. The limitations of the tested ranges and bases are acknowledged but not resolved.

Who May Find This Useful

Readers interested in number theory, combinatorics, or mathematical patterns related to digit counts in factorials and powers may find this discussion engaging.

Kyuubi
Messages
18
Reaction score
8
This may have already been found by many people but I discovered the pattern on my own out of curiosity with some coding.

There are only 4 natural numbers whose factorial contains the same number of digits as the number itself. That is to say n = digits_in(n!).

The trivial case is obviously just 1. 1! has only one digit. The other three are surprising, because they are consecutive.

They are 22, 23, and 24.

Unfortunately for our pal 25, it has 26 digits, and after 25, the number of digits begins increasing with an average >1 and the digits can't keep up with their mere increment of +1.

Just thought that was cool and wanted to share it.
 
  • Like
Likes   Reactions: AndreasC, sophiecentaur, jedishrfu and 1 other person
Mathematics news on Phys.org
I wonder how it would work if you played with different number bases like 2, 3, 5, 7, 11, 13... or powers of 2 ie 2,4,8,16...
 
  • Like
Likes   Reactions: AndreasC, SammyS and Kyuubi
jedishrfu said:
I wonder how it would work if you played with different number bases like 2, 3, 5, 7, 11, 13... or powers of 2 ie 2,4,8,16
I tried with powers as well, but I did it in the form n^n. I just felt like taking powers of 2 would be a bit arbitrary. I want the entire expression to only depend on n. Anyways looking for numbers that satisfy n = digits_in(n^n), we get 1 (as expected), but we also simply get 8 and 9. 8^8 = 16777216 and 9^9 = 387420489. No other numbers satisfy this rule. Granted, I only tried up to 4,000, but I'm confident that won't happen :)

My ideal goal would be to find some expression (ideally a simple one too) that increases the number of digits with an average of +1 increment such that you have a bunch of scattered answers rather than cluttered up consecutive answers.
 
Kyuubi said:
My ideal goal would be to find some expression (ideally a simple one too) that increases the number of digits with an average of +1 increment
Do you know what a logarithm is?
 
  • Like
Likes   Reactions: Tom.G

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 24 ·
Replies
24
Views
3K
Replies
1
Views
6K
  • · Replies 55 ·
2
Replies
55
Views
9K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
6K
Replies
17
Views
6K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K