Cool fact about number of digits in n!

  • #1
Kyuubi
15
7
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 AndreasC, sophiecentaur, jedishrfu and 1 other person
Mathematics news on Phys.org
  • #2
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 AndreasC, SammyS and Kyuubi
  • #3
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.
 
  • #4
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 Tom.G

What is the "Cool fact about number of digits in n!"?

The "Cool fact about number of digits in n!" is a mathematical concept that determines the number of digits in the factorial of a given number, n. The factorial of a number is the product of all positive integers from 1 to n.

What is the formula for calculating the number of digits in n!?

The formula for calculating the number of digits in n! is floor(log10(n!)) + 1. This formula takes the logarithm of n! and rounds down to the nearest integer, then adds 1 to account for the first digit.

How does the number of digits in n! increase as n gets larger?

The number of digits in n! increases rapidly as n gets larger. This is because the factorial function grows very quickly, and the number of digits in the result increases exponentially with the number of digits in n. For example, 10! has 7 digits, while 100! has 158 digits.

What is the largest number of digits in n! that can be calculated?

The largest number of digits in n! that can be calculated depends on the computing power and memory available. However, using the Stirling's approximation, which estimates the value of n!, it is possible to calculate the number of digits in extremely large factorials, such as 1000!.

Can the number of digits in n! be used for any practical applications?

Yes, the number of digits in n! can be used in various applications, such as cryptography, combinatorics, and probability. For example, in cryptography, the number of digits in n! can be used to determine the strength of a password or encryption key. In combinatorics, it can be used to calculate the number of possible combinations of a set of objects. In probability, it can be used to calculate the likelihood of certain events occurring in a given scenario.

Similar threads

  • General Math
Replies
24
Views
2K
Replies
9
Views
1K
  • General Math
Replies
3
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
1K
Replies
12
Views
5K
Replies
7
Views
843
Replies
5
Views
10K
  • Math Proof Training and Practice
2
Replies
67
Views
10K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
Back
Top