Reply
Thread Tools
Math: Diophantine delight... math
Old 02-11-2009, 03:24 PM   #1
Monte314
Core Member [406%]
Chief Scientist; Adjunct Full Professor of Computer Science; Assoc. Professor of Mathematics; various national and state Advisory Panels; author of two books, many papers; Jedi Math Dog
MBTI: INTJ
Join Date: Apr 2008
Posts: 16,260
 

To view links or images in this forum your post count must be 2 or greater. You currently have 0 posts.
Monte314 is offline
Reply With Quote

Old 02-11-2009, 03:29 PM   #2
TheLastMohican
Core Member [187%]
MBTI: ENTJ
Join Date: Feb 2008
Posts: 7,498
 
Yet another that looks so simple...
TheLastMohican is offline
Reply With Quote
Old 02-11-2009, 03:35 PM   #3
tp6626
Core Member [108%]
Curmudgeon, miser, CAD advisor!
MBTI: iNTj
Join Date: Apr 2008
Posts: 4,338
 
I remember seeing this one in New Scientist when I was 17 (I was lucky enough to have a subscription back then). There was a £15 prize. I never looked out for the solution though, I think it was a bit of a stumper!

I'm not going to attempt it, mathematics like this just makes my head hurt nowadays. (I feel too old for it!).
tp6626 is offline
Reply With Quote
Old 02-11-2009, 04:28 PM   #4
Monte314
Core Member [406%]
Chief Scientist; Adjunct Full Professor of Computer Science; Assoc. Professor of Mathematics; various national and state Advisory Panels; author of two books, many papers; Jedi Math Dog
MBTI: INTJ
Join Date: Apr 2008
Posts: 16,260
 

  Originally Posted by tp6626
To view links or images in this forum your post count must be 2 or greater. You currently have 0 posts.
I remember seeing this one in New Scientist when I was 17 (I was lucky enough to have a subscription back then). There was a £15 prize. I never looked out for the solution though, I think it was a bit of a stumper!

I'm not going to attempt it, mathematics like this just makes my head hurt nowadays. (I feel too old for it!).

This particular problem was formulated by yours truly this very afternoon. But I have no doubt that there are many like it out there.

Monte314 is offline
Reply With Quote
Old 02-11-2009, 04:30 PM   #5
Rudy
Administrator
Snowy day, snowy way, warming in spite of itself.
MBTI: INfJ
Join Date: Jan 2009
Posts: 21,722
 
Solution:

24965, 24964. Typing up how I got the answer now...

Okay, I started by trying to factor 1869678781. Surprise! Turns out that it's a prime number.

So, let us note that N = M + C, for some positive number C.

N^3 = (M+C)^3 = M^3 + 3*M^2*C + 3*M*C^2 + C^3 = M^3 + 1869678781.

SO:

3*M^2*C + 3*M*C^2 + C^3 = 1869678781

HOWEVER, since 1869678781 is prime, and 1869678781 is divisible by C, C must equal 1.

SO:

3*M^2 + 3*M + 1 = 1869678781

3*M^2 + 3*M - 1869678780 = 0

*Quadratic Formula Magic*

M = 24964. N = M+C = M+1 = 24965.


That was fun. Thanks, Monte!
Rudy is offline
Reply With Quote
Old 02-11-2009, 08:17 PM   #6
Monte314
Core Member [406%]
Chief Scientist; Adjunct Full Professor of Computer Science; Assoc. Professor of Mathematics; various national and state Advisory Panels; author of two books, many papers; Jedi Math Dog
MBTI: INTJ
Join Date: Apr 2008
Posts: 16,260
 
OK, rudyhenkel has provided a correct answer. Anybody else?
Monte314 is offline
Reply With Quote
Old 02-12-2009, 11:16 AM   #7
tp6626
Core Member [108%]
Curmudgeon, miser, CAD advisor!
MBTI: iNTj
Join Date: Apr 2008
Posts: 4,338
 

  Originally Posted by Monte314
To view links or images in this forum your post count must be 2 or greater. You currently have 0 posts.
This particular problem was formulated by yours truly this very afternoon. But I have no doubt that there are many like it out there.

Oh right, hehe.

I just remember someone writing in saying it was a diophantine problem (as they didn't even mention that, they just showed the original problem - and most likely different integers used than yours).


To view links or images in this forum your post count must be 2 or greater. You currently have 0 posts.

tp6626 is offline
Reply With Quote
Old 02-12-2009, 11:29 AM   #8
Doppelbock
Member [30%]
ERROR: OUT OF BEER
MBTI: INTJ
Join Date: Sep 2007
Posts: 1,208
 
Here's my solution. I took the lazy man's approach:

#include <stdlib.h>
#include <stdio.h>

int main( int argc, char* argv[] )
{
long TheNumber = 1869678781;
long n, m, n3, m3;
for (n=1; n<50000; n++) {
for (m=0; m<n; m++) {
n3 = n*n*n;
m3 = m*m*m;
if (n3 - m3 == TheNumber) {
printf( "n: %ld, m: %ld\n", n, m );
exit(0);
}
}
}
printf( "oops, didn't find n or m\n" );
exit(-1);
}

* * *

output:

n: 24965, m: 24964

 

Last edited by Synamon; 03-23-2009 at 03:25 PM. Reason: signature removed
Doppelbock is offline
Reply With Quote
Old 02-12-2009, 11:33 AM   #9
Rudy
Administrator
Snowy day, snowy way, warming in spite of itself.
MBTI: INfJ
Join Date: Jan 2009
Posts: 21,722
 
Mmm... math plus delicious computer programs. Oh, C++, I remember you fondly...
Rudy is offline
Reply With Quote
Old 02-12-2009, 01:20 PM   #10
Monte314
Core Member [406%]
Chief Scientist; Adjunct Full Professor of Computer Science; Assoc. Professor of Mathematics; various national and state Advisory Panels; author of two books, many papers; Jedi Math Dog
MBTI: INTJ
Join Date: Apr 2008
Posts: 16,260
 

  Originally Posted by Doppelbock
To view links or images in this forum your post count must be 2 or greater. You currently have 0 posts.
Here's my solution. I took the lazy man's approach:

#include <stdlib.h>
#include <stdio.h>

int main( int argc, char* argv[] )
{
long TheNumber = 1869678781;
long n, m, n3, m3;
for (n=1; n<50000; n++) {
for (m=0; m<n; m++) {
n3 = n*n*n;
m3 = m*m*m;
if (n3 - m3 == TheNumber) {
printf( "n: %ld, m: %ld\n", n, m );
exit(0);
}
}
}
printf( "oops, didn't find n or m\n" );
exit(-1);
}

* * *

output:

n: 24965, m: 24964


DB ;-)

Lazy, perhaps. Correct? Yes.

Monte314 is offline
Reply With Quote
Old 02-12-2009, 01:21 PM   #11
Doppelbock
Member [30%]
ERROR: OUT OF BEER
MBTI: INTJ
Join Date: Sep 2007
Posts: 1,208
 
And extra lazy because I didn't bother to correct the nice code indentation that the forum editor was kind enough to erase for me.
Doppelbock is offline
Reply With Quote
Old 02-12-2009, 01:32 PM   #12
Monte314
Core Member [406%]
Chief Scientist; Adjunct Full Professor of Computer Science; Assoc. Professor of Mathematics; various national and state Advisory Panels; author of two books, many papers; Jedi Math Dog
MBTI: INTJ
Join Date: Apr 2008
Posts: 16,260
 

  Originally Posted by Doppelbock
To view links or images in this forum your post count must be 2 or greater. You currently have 0 posts.
And extra lazy because I didn't bother to correct the nice code indentation that the forum editor was kind enough to erase for me.

I hate it when that happens! You go to all the trouble of completely negating the intellectual value of a worthy pursuit by means of some cheap dodge, and then a scrap of poorly crafted software takes the polish off your gloating. Sheesh.

But, you still have our admiration... for whatever that's worth.

Monte314 is offline
Reply With Quote
Old 02-12-2009, 01:50 PM   #13
Doppelbock
Member [30%]
ERROR: OUT OF BEER
MBTI: INTJ
Join Date: Sep 2007
Posts: 1,208
 
Yeah, your admiration and $4 will buy me a latte. ;-)
Doppelbock is offline
Reply With Quote
Old 02-12-2009, 09:41 PM   #14
Jonathan Brewer
Core Member [135%]
MBTI: xxxx
Join Date: Feb 2009
Posts: 5,411
 
Would I be getting it correct if I merely copied and pasted the solutions previously provided?
Jonathan Brewer is offline
Reply With Quote
Old 02-12-2009, 10:05 PM   #15
nacht
Core Member [133%]
"A group of INTJs is an argument."
MBTI: INTJ
Join Date: Jan 2009
Posts: 5,331
 

 
I solved it by using a search engine, does that matter?
Making use of the internet to research a problem is to be encouraged as there could be hidden treasures of mathematics to be discovered beneath the surface of many of these problems. However, there is a fine line between researching ideas and using the answer you found on another website. If you photocopy a crossword solution then what have you achieved?


To view links or images in this forum your post count must be 2 or greater. You currently have 0 posts.

nacht is offline
Reply With Quote
Old 02-13-2009, 03:49 AM   #16
Rudy
Administrator
Snowy day, snowy way, warming in spite of itself.
MBTI: INfJ
Join Date: Jan 2009
Posts: 21,722
 

  Originally Posted by Jonathan Brewer
To view links or images in this forum your post count must be 2 or greater. You currently have 0 posts.
Would I be getting it correct if I merely copied and pasted the solutions previously provided?

Well, you've highlighted well exactly why there are no prizes offered for getting the problems correct =D

Rudy is offline
Reply With Quote
Old 02-13-2009, 06:04 AM   #17
Monte314
Core Member [406%]
Chief Scientist; Adjunct Full Professor of Computer Science; Assoc. Professor of Mathematics; various national and state Advisory Panels; author of two books, many papers; Jedi Math Dog
MBTI: INTJ
Join Date: Apr 2008
Posts: 16,260
 

  Originally Posted by RudyHenkel
To view links or images in this forum your post count must be 2 or greater. You currently have 0 posts.
Well, you've highlighted well exactly why there are no prizes offered for getting the problems correct =D

On the Forum, copied answers are fine, as long as you change the font size or something. As we all know, it's appearance that matters, not substance.

I used to teach a numerical analysis class at Penn State, and kids would hand in computer programs they copied from someone else; they'd change the order of the subroutines or something, thinking that would obscure their duplicity. This is how I got my start in automated pattern recognition....

BWA HA HA HA HA HA HA!!!
Monte314 is offline
Reply With Quote
Old 02-13-2009, 06:38 AM   #18
sagewolf
Member [02%]
MBTI: INTP
Join Date: Feb 2009
Posts: 115
 

 
Would I be getting it correct if I merely copied and pasted the solutions previously provided?

That's no fun. Do like me and just bang your head against your desk until it magically makes sense.

And the answer is clearly marshmallow.

(I will get this...
To view links or images in this forum your post count must be 2 or greater. You currently have 0 posts.
)

sagewolf is offline
Reply With Quote
Old 02-13-2009, 06:45 AM   #19
Monte314
Core Member [406%]
Chief Scientist; Adjunct Full Professor of Computer Science; Assoc. Professor of Mathematics; various national and state Advisory Panels; author of two books, many papers; Jedi Math Dog
MBTI: INTJ
Join Date: Apr 2008
Posts: 16,260
 
I agree with sagewolf. There are some problems I struggled with (off and on) for over 20 years... and there are some I'm still trying to wrestle to the ground.

Of course, if I can solve it in 20 years, it's fair game as homework for my students....

That big, long number is prime, and the difference of two cubes can be factored....
Monte314 is offline
Reply With Quote
Old 02-13-2009, 12:26 PM   #20
AnotherNormal
Member [20%]
MBTI: xxxx
Join Date: Dec 2008
Posts: 803
 
My lazy man solution ...



Did it in Excel vba


Option Explicit

Sub solveformonte()
Dim Done As Boolean
Dim N As Long, M As Long
Const Monte = 1869678781

Done = False
N = 1
M = 1
Do
If N ^ 3 < M ^ 3 + Monte Then
N = N + 1
ElseIf N ^ 3 > M ^ 3 + Monte Then
M = M + 1
Else
Done = True
Range("A1").Value = "N ="
Range("B1").Value = N
Range("A2").Value = "M ="
Range("B2").Value = M
End If
Loop Until Done
End Sub

AnotherNormal is offline
Reply With Quote
Old 02-13-2009, 03:27 PM   #21
SirJac
Member [23%]
MBTI: INTJ
Join Date: Oct 2007
Posts: 956
 
Lazy man in python:


import math
a = False
n = 1231
monte = 18697871
while a == False:
n = n + 1
mrange = int(math.pow((n**3 - monte),0.33333333333))
for m in range(mrange,mrange + 2):
if monte == n**3 - m**3:
a = True
break
print n,m

results: N = 24965 M = 24964
SirJac is offline
Reply With Quote
Old 02-13-2009, 03:38 PM   #22
nacht
Core Member [133%]
"A group of INTJs is an argument."
MBTI: INTJ
Join Date: Jan 2009
Posts: 5,331
 
Those of you using code on this one should
To view links or images in this forum your post count must be 2 or greater. You currently have 0 posts.
~_^
nacht is offline
Reply With Quote
Old 02-14-2009, 07:06 PM   #23
Monte314
Core Member [406%]
Chief Scientist; Adjunct Full Professor of Computer Science; Assoc. Professor of Mathematics; various national and state Advisory Panels; author of two books, many papers; Jedi Math Dog
MBTI: INTJ
Join Date: Apr 2008
Posts: 16,260
 

  Originally Posted by nacht
To view links or images in this forum your post count must be 2 or greater. You currently have 0 posts.
Those of you using code on this one should
To view links or images in this forum your post count must be 2 or greater. You currently have 0 posts.
roblem ~_^

Egyptian fractions! I posted a problem in this area awhile back... very interesting subject.

Elementary number theory has always been interesting to me, as have some more advanced topics (e.g., factorization in extension fields, fourier transforms over finite fields)... but there is this broad area in between involving congruences, residues, and the like that has always left me cold. I think it's the notation; I just don't like the way it looks or "feels".

Monte314 is offline
Reply With Quote
Old 02-14-2009, 10:32 PM   #24
Jonathan Brewer
Core Member [135%]
MBTI: xxxx
Join Date: Feb 2009
Posts: 5,411
 
Almost like it never truly resolves anything?
Jonathan Brewer is offline
Reply With Quote
Old 02-14-2009, 11:15 PM   #25
Gwargh
Member [02%]
Fight fire with humor!
MBTI: INTJ
Join Date: Aug 2008
Posts: 88
 
I think I beat everyone in lazyness, since I went with a gut feeling which I guess worked. woot!
Ok, So I'm going along with a gut feeling (yay for Ni!)
I'm not sure about this particular problem, but I'm getting a strong hunch that: N=M+1

So I'm just going to go ahead with the assumption that this is so and solve as follows:

(M+1)^3 = M^3 + 1869678781
M^3 + 3M^2 + 3M + 1 = M^3 +1869678781
3M^2 + 3M - 1869678780 = 0
Solve for M
M= 24964
N = 24965
Checked it and it fits. Hooray!
Gwargh is offline
Reply With Quote
Reply

Tags
math

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:00 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Myers-Briggs Type Indicator, Myers-Briggs, and MBTI are trademarks or registered trademarks of the
Myers-Briggs Type Indicator Trust in the United States and other countries.