## What a difference

Posted by Chris on April 7, 2011 – 6:40 am

If m and n are positive integers and 33^m – 7^n = d, what is the smallest magnitude of d if d is positive and if d is negative? (That’s two questions).

Posted by Chris on April 7, 2011 – 6:40 am

April 7th, 2011 at 1:12 pm

it appears we are looking for something better than the quick answer of 33^1 – 7^1 = 26 & 33^1 – 7^2 = -16. This might take some itterations…I’ll be back if no one gets to the answer before me.

April 7th, 2011 at 2:06 pm

I think I might have the positive part. At least through 1000 integers

d = 33^m -7^n

solving this equation for zero

0 = 33^m – 7^n

7^n = 33^m

n*ln(7)=m*ln(33)

n = m * ln(33)/ln(7) gives the equation wehre d = 0

aprox = 1.797

To find the integers that get me closest to this line,

i divided all of the integers between 1 and 1000 by this value.

find where ((n/1.797)-round(n/1.797,0)) is at a minimum

This gives m = 64 and n = 115 (the rounded value is n)

April 7th, 2011 at 2:35 pm

I have now convinced myself I am wrong. Using the same method for the 1st 1 million integers i get:

n = 605,231

m = 336,829

whic i also believe to be incorrect or at best a limited solution.

April 7th, 2011 at 8:24 pm

Hi all. If you only use a computer, unless you get 0, you’ll never be sure if there’s a smaller value.

April 8th, 2011 at 10:24 am

I have to go with DP on this one. 26 and -16 given how fast these numbers increase in size it seems very unlikely to get closer to 0 thand 26 and -16.

Powers of seven

2 49

3 343

4 2401

5 16807

6 117649

7 823543

8 5764801

9 40353607

10 282475249

11 1977326743

12 1 3841287201

13 9 6889010407

14 67 8223072849

15 474 7561509943

16 3323 2930569601

17 23263 0513987207

18 162841 3597910449

19 1139889 5185373143

20 7979226 6297612001

21 55854586 4083284007

22 390982104 8582988049

23 2736874734 0080916343

24 1 9158123138 0566414401

25 13 4106861966 3964900807

26 93 8748033764 7754305649

27 657 1236236353 4280139543

28 4599 8653654473 9960976801

29 32199 0575581317 9726837607

30 225393 4029069225 8087863249

31 1577753 8203484580 6615042743

32 11044276 7424392064 6305299201

33 77309937 1970744452 4137094407

34 541169560 3795211166 8959660849

35 3788186922 6566478168 2717625943

36 2 6517308458 5965347177 9023381601

37 18 5621159210 1757430245 3163671207

38 129 9348114471 2302011717 2145698449

39 909 5436801298 6114082020 5019889143

40 6366 8057609090 2798574143 5139224001

41 44567 6403263631 9590019004 5974568007

42 311973 4822845423 7130133032 1821976049

43 2183814 3759917965 9910931225 2753832343

44 15286700 6319425761 9376518576 9276826401

45 107006904 4235980333 5635630038 4937784807

46 749048330 9651862334 9449410269 4564493649

47 5243338316 7563036344 6145871886 1951455543

April 8th, 2011 at 11:26 am

I believe, that given the growing gap that you see, it is possible, if not likely, that the power of one will ‘lap’ the other. I mean that this gap will not continue to only get larger, but may reach a point that the delta could jump to a much smaller number.

I’m anxious to look into it more.

April 8th, 2011 at 3:30 pm

OK, here’s a bone – modulo arithmetic.

April 8th, 2011 at 9:02 pm

Another bone. Try mod 16 (^^) and one other.

April 9th, 2011 at 9:18 am

A solution. DP had correctly identified the values, but obviously didn’t know that this really was the best that could be done.

33

^{m}– 7^{n}. In modulo 16 we get 33^{m}= 1^{m}= 1, for all m ≥ 0.As 7

^{2}= 49 = 1 (mod 16), we get for even n that 33^{m}– 7^{n}= 0 (mod 16)and for odd n we get 33

^{m}– 7^{n}= -6 = 10 (mod 16).So if n is odd, 33

^{m}– 7^{n}must be of the form 16p+10 =>…,-54,-38,-22,-6,10,26,42,58,74,… and if n is even 33

^{m}-7^{n}must be ofthe form 16p => …,-48,-32,-16,0,16,32,48,…

Now try mod 3 (say). Then 33

^{m}– 7^{n}= 0 – 1 = 2 (mod 3), all m,n.So 33

^{m}– 7^{n}must be of the form 3p+2 => …,-19,-16,-13,-10,-7,-4,-1,2,5,8,11,14,17,20,23,26,27,30,…

Clearly, candidate results must be common to both lists. We find -16 and +26 satisfy that, and fortunately, it is pretty easy to see that m = n = 1 =>

33

^{m}– 7^{n}= 26; and m = 1, n = 2 => 33^m-7^n = -16.This doesn’t let us readily see if other values of m,n do the job (or even if there are other values).

That was a Harvard grade problem.

April 11th, 2011 at 10:40 am

26 and -16 are the answers

April 11th, 2011 at 11:03 am

Hi Abhinav. That’s right, but how do you know that?

April 11th, 2011 at 5:51 pm

Just for a giggle I’ve tried brute force, but with some cunning, to see if another m,n pair can give 26.

We want 33

^{m}– 7^{n}= 26 => 7^{n}= 7 (mod 33). Euler’s generalisation of Fermat’s Lttle Theorem => 7^20 = 1 (mod 33). Where 20 = φ(33), and φ() is Euler’s totient function. A couple of checks shows that there is no smaller power (other than the trivial 0) that does it. So n has to be of the form 20p + 1, to give 33^{m}– 7^{20p+1}= 26.That can be solved for m as m = log(26 + 7

^{20p+1})/log(33).That is equivalent to log_base_33(26 + 7

^{20p+1}).I actually wrote this as (Mathematica code):

For[p = 0, p < 100 000, p++, {

m = Round[Log[33, 26 + 7^(1 + 20 p)]],

If[33^m - 7^(1 + 20 p) == 26, Print[m, " ", 33^m - 7^(1 + 20 p)],]

}

]

It only found the solution that we already knew.

April 11th, 2011 at 7:23 pm

Looking at it in mod 26 we get 33

^{m}– 7^{n}= 26 =>7

^{m}= 7^{n}(mod 26). φ(26) = 26(1 – 1/2)(1 – 1/13) = 12, whwre φ() is Euler’s totient function. So 7^{φ(26)}= 7^{12}= 1 (mod 26). And it turns out that 12 is the smallest power that does that. So n (in particular) is of the form 12q. As LCM(12,20) = 60 the 20 I used in the above program can be replaced by 60. I have done that and I’m currently running the program, starting from where the previous one had got to. At this moment I have got to n = 2 760 000 without finding another solution.I don’t think I can come up with such a rapid test using rules for m. Worse still, I haven’t found a mathematical proof that no other powers will do it.

April 11th, 2011 at 7:35 pm

Ooops, I think I’ve goofed that last bit, not sure that multiples of 60 is right anymore. I’m done, unless I have a brainwave. But if 60 is OK then I’ve just got to n = 3 000 000.

April 16th, 2011 at 4:23 pm

M would be 1 if you are trying to make D have the least positive value and since an integer goes from every negative number, and negative fractions, which also include decimals, and 7^1.796 is just under 33. and so 33-the product of 7^1.796 equals 0.055 which is positive still, and one of the lowest answers for D, however, by making the decimal that powers 7 smaller and more elaborate, you get a smaller answer for d. As for a negative answer for d, you could just make N 1.797 or even more elaborate and get a smaller negative number for D.

April 16th, 2011 at 4:48 pm

Hi BeccaBeth. The question said m and n are positive integers. Fractions and decimal numbers are not integers. Also negative numbers are not positive numbers. The positive integers are 1,2,3,4,5,… and m and n have to be one of those.

If we allowed m and n to be any old number, then there are infinitely many choices for m and n such that 33

^{m}– 7^{n}= 0. i.e. m/n = log33/log7 = 1.79684943992092337566530703483053783529606780447361015067173…I’m pretty sure that’s an irrational number.