Question about finding the difference of perfect powers

BaseMath

New member
Joined
Jul 20, 2022
Messages
5
Recently I have been trying to find a formula for finding the smallest number where a given number a has reached n more perfect powers than a+1 has.
For example, if a=2, then the smallest power of 2 that is 2 powers more than the powers of 3 up to that point is 8, since 2^3=8 and 3^2=9, so at 8 two has reached 3 powers and 3 has reached 1 power for a difference of 2 powers, if that makes sense. If a=3, then we have to go out to 3^10 for 3 to get to 3 more powers than 4 has. since 4 gets to 4^7 before 3 gets to 3^9. In math terms 3^9>4^7 and 3^10<4^8.
I have a method of finding the smallest number for a given n which involves this formula: 0>=(a*(a+1)^(n-a))-(((a^(n+1))/a) where a is the number in question and n is the exponent it's being raised to. I plug in natural number values for n for a given a then count how many return an answer below 0 and that's the exponent of the smallest number for a given a that a has reached a more powers than a+1 has.
I'm looking for a formula that gives me the n for a given a. So if I would input a 2 as a, it would return a 3, if a=3, return a 10, if a=7, return 94, and so on. Basically the output would be what power the number in question has to be raised to to go through a more powers than a+1 has.
 
I have a method of finding the smallest number for a given n which involves this formula: 0>=(a*(a+1)^(n-a))-(((a^(n+1))/a) where a is the number in question and n is the exponent it's being raised to. I plug in natural number values for n for a given a then count how many return an answer below 0
You wish to find the smallest value of n for which f(n,a) ≥ 0 where f(n,a) = (a*(a+1)^(n-a)) - ((a^(n+1))/a)

I suggest that you let f(n,a) = 0 giving...
a*(a+1)^(n-a) = (a^(n+1))/a
...then simplify this, take logs, and then rearrange to n = <something in terms of a>

NOTE: I haven't checked that your inequality is correct. This is because I don't understand what you're trying to accomplish :unsure::). Perhaps if you can give us some extra background/ context then it might make things more obvious. However, if you're confident about your inequality then the method I've suggested will provide you with a direct answer. Are you familiar with logarithms?

EDIT: Since you require integer "n", then to finish off you'll have to find the next lowest integer value of the result by using the "floor" function
 
Last edited:
You wish to find the smallest value of n for which f(n,a) ≥ 0 where f(n,a) = (a*(a+1)^(n-a)) - ((a^(n+1))/a)

I suggest that you let f(n,a) = 0 giving...
a*(a+1)^(n-a) = (a^(n+1))/a
...then simplify this, take logs, and then rearrange to n = <something in terms of a>

NOTE: I haven't checked that your inequality is correct. This is because I don't understand what you're trying to accomplish :unsure::). Perhaps if you can give us some extra background/ context then it might make things more obvious. However, if you're confident about your inequality then the method I've suggested will provide you with a direct answer. Are you familiar with logarithms?

EDIT: Since you require integer "n", then to finish off you'll have to find the next lowest integer value of the result by using the "floor" function
Thank you, and yes I believe that this is that equation in n = <something in terms of a> form: n < a*ln(a + 1)/ln(1 + 1/a).
The original way I tried to describe the value I'm looking for is: a^n > (a+1)^(n-a) which is where 0>=(a*(a+1)^(n-a))-(((a^(n+1))/a) comes from, with an extra a* added in in the front so the output is easier to work with.
As to what I'm trying to do, I'll try using a table to explain:


59049​
1​
2​
3​
4​
5​
6​
7​
8​
9​
10​
1​
1​
1​
1​
1​
1​
1​
1​
1​
1​
1​
2​
2​
4​
8​
16​
32​
64​
128​
256​
512​
1024​
3​
3​
9​
27​
81​
243​
729​
2187​
6561​
19683​
59049​
4​
4​
16​
64​
256​
1024​
4096​
16384​
The table is a table of powers of 1-4 below 59,049 up to the tenth power. The numbers on the left are being raised to the numbers in the top row, with cell A1 being the maximum value that the other cells can have. As you can see there are 3 more powers of 3 than powers of 4 below 3^10.
This is the same table with a max of 3^9:


19683​
1​
2​
3​
4​
5​
6​
7​
8​
9​
10​
1​
1​
1​
1​
1​
1​
1​
1​
1​
1​
1​
2​
2​
4​
8​
16​
32​
64​
128​
256​
512​
1024​
3​
3​
9​
27​
81​
243​
729​
2187​
6561​
19683​
4​
4​
16​
64​
256​
1024​
4096​
16384​
At 3^9 3 has only 2 more powers than 4 has, same with 3^8 and you can probably see that the first time that 3 has 3 more powers than 4 is at 3^10.
This table also works for 2 and 1:

8​
1​
2​
3​
4​
5​
6​
7​
8​
9​
10​
1​
1​
1​
1​
1​
1​
1​
1​
1​
1​
1​
2​
2​
4​
8​
3​
3​
4​
4​

Here you can see that there are 3 powers of 2 that are 8 or less, while there is only 1 power of 3 that is 8 or less, so 2 has 2 more powers at 2^3 than 3 does.
The question is what number is the lowest number such that there are 4 more powers of 4 equal to or less than it than powers of 5 equal to or less than it. And what would that number be for powers of 5 or 6 or 125?
I hope I did a better job of explaining it this time.

Yes, I am familiar with logarithms, in fact when I put 0>=(a*(a+1)^(n-a))-(((a^(n+1))/a) into Microsoft Excel for n>11 the numbers got too big for excel to handle, I believe the limit is around 10^302 so I changed the formula to use logarithms instead and the highest value I input was 8^8 which I got a value of 312,976,389 for. Now that was for n^n, so it means that for the powers of 8 to have 8^8 more powers than the powers of 9 you need to raise 8 to the power of 312,976,389. Since I have to count the number of values below 0 to get that number I basically just input a starting value for my array of 1,000 cells and saw which error message the cells had then tried higher and lowers numbers converging to the number that the values became positive, a bit like some methods of adding sums to get Pi, you shoot high then low but get more digits of the number the more you add up.

Now for this: a^n > (a+1)^(n-a)
I asked this question on a different forum and someone said:
"Just because n = 3 satisfies the inequality doesn’t mean it’s the solution. n = 2 also satisfies the inequality since 4 > 30. So does n ≤ 1. In fact when a > 0, there is no minimum n that satisfies the inequality, but rather a maximal n < a*ln(a + 1)/ln(1 + 1/a). The maximum integer is the greatest integer n less than the right side of the solution."
Which if you look at the tables there is obviously a minimum value, which I guess means that a^n > (a+1)^(n-a) doesn't accurately describe the value/relationship I'm looking for which is why I didn't include it in my post here. The smallest number where 3 has 3 more powers than 4 is 3^10 so there has to be a minimum but I don't know how to express that in mathematical terms.
What I believe is going on with what that person was saying about a^n > (a+1)^(n-a) not having a minimum is because that inequality is essentially measuring the ratios of a and a+1 when raised to n, and not counting the number of powers that a and a+1 have gone through. So that person is right about there not being a minimum in that sense I believe, but I'm talking about the number of powers and not the ratios. And the number of powers do indeed have a minimum.
I never did get an answer on that other forum which is why I came here.
I hope that explains what I'm trying to do better, I'm sorry if I overexplained.
 
Let me see if I get this.

For integer a [imath]\ge[/imath] 2,

[math]\text {Find smallest integer } n \text { such that } n > 1 \text { and } a^{(n+1)} > (a + 1)^n.[/math]
Defining log as log to base 10

[math]a^{(n+1)} > (a + 1)^n \implies (n + 1) \log (a) > n \log (a +1) \implies \\ \log(a) > n \{\log (a + 1) - \log (a) \} = n \log \{(a + 1) \div a \} \implies \\ \dfrac{\log (a)}{ \log \{ (a + 1) \div a\}} > n \implies n = \left \lfloor \dfrac{ \log (a) }{ \log \{(a + 1) \div a \}} \right \rfloor + 1. [/math]
This is what cubist was suggesting.

First, do you understand the logic (I left out some steps)?

Second, do you see that n will grow much faster than a?

Thitd, where I have the defective brackets is the int function in excell.

EDIT: I may need to think more about this, but I have other work to do right now. Play with it in excell, and I’ll revisit it later today. Sorry if it turns out to be a false trail.
 
Last edited:
Let me see if I get this.

For integer a [imath]\ge[/imath] 2,

[math]\text {Find smallest integer } n \text { such that } n > 1 \text { and } a^{(n+1)} > (a + 1)^n.[/math]
Defining log as log to base 10

[math]a^{(n+1)} > (a + 1)^n \implies (n + 1) \log (a) > n \log (a +1) \implies \\ \log(a) > n \{\log (a + 1) - \log (a) \} = n \log \{(a + 1) \div a \} \implies \\ \dfrac{\log (a)}{ \log \{ (a + 1) \div a\}} > n \implies n = \left \lfloor \dfrac{ \log (a) }{ \log \{(a + 1) \div a \}} \right \rfloor + 1. [/math]
This is what cubist was suggesting.

First, do you understand the logic (I left out some steps)?

Second, do you see that n will grow much faster than a?

Thitd, where I have the defective brackets is the int function in excell.

EDIT: I may need to think more about this, but I have other work to do right now. Play with it in excell, and I’ll revisit it later today. Sorry if it turns out to be a false trail.
Definitely the right method! But unfortunately I think you copied the starting point incorrectly
 
Definitely the right method! But unfortunately I think you copied the starting point incorrectly
Actually, sorry, I don't think we've posted the correct starting point yet

I hope that explains what I'm trying to do better, I'm sorry if I overexplained.
There's a lot of words there and I'm not so great with words ? However, the tables helped a lot. I think there's nothing wrong with your inequality except that it should be ≥...
a^n (a+1)^(n-a)

But it misses the extra (and more important) requirement that...
[math]a^n \lt (a+1)^{(n-a+1)}[/math]
You seek the smallest value of n that satisfies the above inequality where both a,n are integer and a ≥ 2 and n>a
This basically says that there must be a blank cell in the next row down, "a-1" columns to the left of "n".

I'll leave it to @JeffM to solve this for you, or perhaps you could have a go at solving it yourself by taking logarithms? I'll start you off :D
[math]\log\left({a^n}\right) \lt \log{\left((a+1)^{n-a+1}\right)} [/math]
Hint: Use this property [imath]\log(x^y) = y*\log(x)[/imath]
 
Ok, so from this: log(an)<log((a+1)n−a+1) I used that property to get: n*log(a)<(n-a+1)*log(a+1) and I figured I needed to distribute the right side to separate the a and the n in the brackets so I got n*log(a)<n*(log(a+1))-a(log(a+1))+log(a+1).
From there I tried a couple ways to get all the a's to one side and all the n's to the other including diving by n or dividing by log(a+1) with the latter resulting in (n*log(a))/log(a+1)<n-a+1 and I am stumped as to how to do it.
First, do you understand the logic (I left out some steps)?

Second, do you see that n will grow much faster than a?
No, beyond the second step I'm pretty lost, which is probably why I can't simplify (n*log(a))/log(a+1)<n-a+1.


Well yeah, that's part of why I'm interested in this sequence is since it's a relatively fast growing one. Is there something significant about n growing much faster than a that I'm missing?

by a=12 n is already above 10^300, here's the data on the first 11 terms:


N
1​
1​
2​
8​
3​
59049​
4​
1.76E+13​
5​
9.09E+27​
6​
6.33E+49​
7​
2.75E+79​
8​
2E+118​
9​
9.8E+166​
10​
1E+227​
11​
6.9E+297​
The exponents themselves grow exponentially, on a graph it looks pretty close to quadratically actually. Though I'm looking for a function that returns the exponent that a is raised to, so for 1 it's 1, 2 it's 3, 3 it's 10, 4 it's 22, and so on.
For integer a ≥\ge≥ 2,
I don't believe there's a problem with a=1 since at 1 there is more than 1 more power of 1 than 2 has at 1. In other words 2 has 2 more powers than 3 does at 8 and 1 has at least 1 more power than 2 does at 1 if that makes sense.
 
Recently I have been trying to find a formula for finding the smallest number where a given number a has reached n more perfect powers than a+1 has.
For example, if a=2, then the smallest power of 2 that is 2 powers more than the powers of 3 up to that point is 8, since 2^3=8 and 3^2=9, so at 8 two has reached 3 powers and 3 has reached 1 power for a difference of 2 powers, if that makes sense.
Let's first get straight exactly what you are asking for because I misunderstood first time round.

[math]\text {Given integers } a \text { and } n \text { such that } n \ge a \ge 2,\\ \text {find maximum } n \text { such that } a^n > (a + 1)^{(n-a+1)}.[/math]
Is that the problem?
 
Given integers a and n such that n≥a≥1,
find smallest value for n such that
a^n<(a+1)^(n−a+1).

I believe that is what I'm asking, rather a formula for find the smallest value for n given a value of a.
 
Ok, so from this: log(an)<log((a+1)n−a+1) I used that property to get: n*log(a)<(n-a+1)*log(a+1) and I figured I needed to distribute the right side to separate the a and the n in the brackets so I got n*log(a)<n*(log(a+1))-a(log(a+1))+log(a+1).
From there I tried a couple ways to get all the a's to one side and all the n's to the other including diving by n or dividing by log(a+1) with the latter resulting in (n*log(a))/log(a+1)<n-a+1 and I am stumped as to how to do it.
Good so far...
n*log(a) < n*log(a+1)-a(log(a+1))+log(a+1)
n*log(a) < n*log(a+1) + (1-a)*log(a+1) ...since there was no need to distribute the (1-a)
n*log(a) - n*log(a+1) < (1-a)*log(a+1) ...by subtracting n*log(a+1) from both sides
n * (log(a) - log(a+1)) < (1-a)*log(a+1) ...by factoring

Can you see the last step? Be careful because (log(a) - log(a+1)) is negative. Do you know what happens to an inequality when both sides are multiplied or divided by a negative amount?
 
Ah, I literally forgot about factoring I guess. And yes, I do remember that multiplying and diving by a negative with in an inequality from school, I think so anyway. The sign flips which means I'd get:
n>((1-a)*log(a+1))/(log(a)-log(a+1)) which works when I put it in Excel with a ceiling.math function! ?
Thank you Cubist!
I'll have to play around with it and see if I can make one for n^n!
Edit:
Er, rather a^a, like if a=2, the the smallest number that has 2^2 more powers than 3 does. or if a=3, the 3^3 more powers, and so on.
Many thanks!
Edit 2:
It's literally just n>((1-a^a)*log(a+1))/(log(a)-log(a+1))
 
Last edited:
Ah, I literally forgot about factoring I guess. And yes, I do remember that multiplying and diving by a negative with in an inequality from school, I think so anyway. The sign flips which means I'd get:
n>((1-a)*log(a+1))/(log(a)-log(a+1))
Almost perfect. I'd switch the sign of both numerator and denominator of the RHS (thus making them both positive quantities instead of both being negative).
n>((a-1)*log(a+1))/(log(a+1)-log(a))

which works when I put it in Excel with a ceiling.math function! ?
I'm pretty sure that the RHS of that inequality could never be an integer, therefore it's probably safe to use ceiling. (Note that the inequality specifies greater than, and not equal to. Therefore if you had an integer RHS value, say 5, then ceil 5 would return 5 meaning n would also be 5 when it really ought to be 6 (which is strictly greater). If you really want to be sure then you could switch "ceil(x)" to "floor(x)+1"

Thank you Cubist!
You're welcome!

Er, rather a^a, like if a=2, the the smallest number that has 2^2 more powers than 3 does. or if a=3, the 3^3 more powers, and so on
...
It's literally just n>((1-a^a)*log(a+1))/(log(a)-log(a+1))
Indeed, well done!
 
Top