Does a number n raised to itself (n^n) will have digits depending on the original number n?

92 Views Asked by At

Consider, 7^7 = 823543, the digit 3 in 823543 is repeated two times, is it possible that a number raised to itself can have a higher repetitions of any other digit or is it random. Now consider, 93^93 in python as:

str(pow(93,93)).count("1") 

The Result is 25, so is it random (it has no relation or is independent of the original number n) or Is there a distribution amongst the counts of digits(is it uniformly distributed or how will it be distributed)? Since as we go to a very high number it may not be possible to compute n^n of that number (or will take a long computational time), will it be still possible to predict what numbers will occur the most in the digits of n^n number? Is it also true for the frequency of other digits in n^n.

[Okay, so I have reopened the question, to state why this question is important, also note this is my original work]:

Consider a rule based approach to define a mathematical series (just how the prime numbers are rule based), which in this case relies on the counts of digits of large numbers, in my case I have discovered 125 unique series where I equate for n^n sum of digits of choose 5 from 10 numbers to remaining 5 numbers (i.e: 0's+1's+2's+3's+4's=5's+6's+7's+8's+9's ,satisfying this will mean that the number n is in the first infinite series), now likewise I get 125 infinite series, (I can do many more such combinations for digits of large numbers).

Now, it is hard to predict what the next number is going to be for these series (I think it should be unpredictable and should be random) but it is easy to verify by running the python script. So this is my hypothesis which if true means that Mathematics can in fact generate truly random series (where the next number can not be predicted) but if on the other hand, someone were to prove this hypothesis false, would mean that we can solve something which is increasing in time complexity even more than exponentially (tetration, n^n and also verifying the rule for counts of digits) in polynomial time. Which means simply that even prime numbers can be solved (as in we can predict the next prime number in polynomial time compared to verifying it).

Why my series is different than the primes is simply because I could infer that the counts of large digits follows a uniform distribution(i.e: It is truly random series), where every digit has an equal chance of occurring, whereas in primes we do not know that if it is random or not(do we?).

So I simply want to know, is mathematics generating true random numbers or can we predict a series in the same time complexity it takes of verifying it (If it has a solution or an equation).

Furthermore, most interesting thing happens, that all 125 infinite series that I have generated seems to converge (suggesting it is not random) when I increase the numbers from 1000 to 10000. ( I couldn't calculate for 100000 numbers as it would take a lot of time).

My code for this to generate my unique infinite series along with all the series and graphs that show it's converging is in the following repository:

https://github.com/code93/DAWN

[There is another research question that I want to ask here, it is a secondary research question and that is of the series being random or non random, how can we numerically say of how much random the infinite series is or how much non-random the infinite series is? like the pattern 010101 will have a higher chance of having 0 as the next number, so in my case of series, how much random is it?, can we also compare my series to prime number series or digits of pi and tell how much random are these to one another, which could also mean how much pattern less are these?]

1

There are 1 best solutions below

1
On BEST ANSWER

It seems random if the number doesn't end in 0 and n is greater than 300, i.e: for large numbers of n^n, ~97% of all digits lies between 7.6% to 13.3%, which is very close to 10% and there are 10 numbers, so it is uniformly distributed. Refer the reproducible python code below:

import math
def powdist(n):
    sum = 0
    rel = 0.25
    tot=str(pow(n,n)).count("0")+str(pow(n,n)).count("1")+str(pow(n,n)).count("2")+str(pow(n,n)).count("3")+str(pow(n,n)).count("4")+str(pow(n,n)).count("5")+str(pow(n,n)).count("6")+str(pow(n,n)).count("7")+str(pow(n,n)).count("8")+str(pow(n,n)).count("9")
    if(math.isclose(0.10,str(pow(n,n)).count("0")/tot,rel_tol=rel))==True:
        sum=sum+1
    if math.isclose(0.10,str(pow(n,n)).count("1")/tot,rel_tol=rel)==True:
        sum=sum+1
    if math.isclose(0.10,str(pow(n,n)).count("2")/tot,rel_tol=rel)==True:
        sum=sum+1
    if math.isclose(0.10,str(pow(n,n)).count("3")/tot,rel_tol=rel)==True:
        sum=sum+1
    if math.isclose(0.10,str(pow(n,n)).count("4")/tot,rel_tol=rel)==True:
        sum=sum+1
    if math.isclose(0.10,str(pow(n,n)).count("5")/tot,rel_tol=rel)==True:
        sum=sum+1
    if math.isclose(0.10,str(pow(n,n)).count("6")/tot,rel_tol=rel)==True:
        sum=sum+1
    if math.isclose(0.10,str(pow(n,n)).count("7")/tot,rel_tol=rel)==True:
        sum=sum+1
    if math.isclose(0.10,str(pow(n,n)).count("8")/tot,rel_tol=rel)==True:
        sum=sum+1
    if math.isclose(0.10,str(pow(n,n)).count("9")/tot,rel_tol=rel)==True:
        sum=sum+1
    
    return sum/10

rat = 0
for i in range(300,10000):
    ratio = powdist(i)
    print("[+] For number "+str(i)+" ratio in percentage is")
    print(ratio*100)
    if(ratio*100==100):
        rat = rat+1
print(str(rat*100/9030))
```