
Number Theory Number Theory Math Forum 
 LinkBack  Thread Tools  Display Modes 
January 3rd, 2011, 01:44 PM  #1  
Newbie Joined: Jan 2011 Posts: 2 Thanks: 0  Please help me understand the syntax
I got this problem I have to find the solution for: Quote:
I just don't fully understand the question, I'll just note down what I think it is I have to do, just correct me if i'm wrong. My theory: I have to find every unique combination of variables A, B and C. (the count of all these combinations is the answer) A, B and C can have values ranging from 0~100. N can be any value ranging from 2~20 Is this correct? do I have the ranges correct? or am I missing something completely? Please help me out with this problem, thank you  
January 3rd, 2011, 02:08 PM  #2 
Global Moderator Joined: May 2007 Posts: 6,378 Thanks: 542  Re: Please help me understand the syntax
The problem assumes you are naive about mathematics. Fermat's last theorem (proved around 1995) states that for n > 2 there are no solutions. So the problem is really finding the solutions for n=2. The general approach is to let i and j be any relatively prime integers with i > j. Then a=i^2  j^2, b=2ij will give you a solution. As you can see, c=i^2 + j^2. http://en.wikipedia.org/wiki/Formulas_f ... an_triples The above is a more complete discussion. 
January 3rd, 2011, 02:34 PM  #3 
Newbie Joined: Jan 2011 Posts: 2 Thanks: 0  Re: Please help me understand the syntax
Yes, I'm pretty naive about this subject but I'm trying. So you're saying there are no other values for n that would make a match besides the value 2? also I tried figuring out the relatively prime solution but I can't seem to figure out how they work. I realize I'm being a pain because my lack of knowledge in this area, but I'd be very grateful if someone could explain me on what to do exactly. I'ts a programming problem and I need to solve it using my programming abilities, but it's useless if I don't know what to do. Please help me out. 
January 3rd, 2011, 04:32 PM  #4 
Senior Member Joined: Jul 2010 From: St. Augustine, FL., U.S.A.'s oldest city Posts: 12,155 Thanks: 463 Math Focus: Calculus/ODEs  Re: Please help me understand the syntax
If it were me, I would approach this problem using the method of Euclid for generating Pythagorean triples. As [color=#008000]mathman[/color] stated, Fermat's Last Theorem was proven to be true, so only n = 2 need be considered. Let m and n be nonnegative integers where and k be a positive integer: and So, for (m,n)=(0,0) we get the triple (0,0,0) for any value of k from both sets. For (m,n) = (1,0) we get k(1,0,1) and k(0,1,1) so you can let k vary from 1 to 100. For (m,n) = (1,1) we get k(0,2,2) and k(2,0,2) but these will not be distinct as the previous case has already generated them. Thus we no longer need check when m = n or when n = 0. For (m,n) = (2,1) we get k(3,4,5) and k(4,3,5) so you can let k vary from 1 to 20. For (m,n) = (3,1) we get k(8,6,10) and k(6,8,10) but these will already have been generated by the previous case. In fact, from here on out, we need only consider when m and n are coprime and only one of them is odd. Hope this helps you get started. 
January 4th, 2011, 10:22 AM  #5  
Global Moderator Joined: Nov 2006 From: UTC 5 Posts: 16,046 Thanks: 937 Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms  Re: Please help me understand the syntax
Your interpretation of the problem is correct. Quote:
 

Tags 
syntax, understand 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Help me understand this  bradhills  Algebra  1  February 21st, 2013 01:48 PM 
Help me understand this?  goodjobbro  Number Theory  13  December 25th, 2012 07:36 PM 
Don't understand  scrum  Calculus  2  January 28th, 2010 01:33 AM 
I don't understand this...  johnny  Algebra  1  July 21st, 2009 02:18 AM 
can someone help me understand this  Williamson  Calculus  5  July 13th, 2008 10:17 AM 