Number Theory Number Theory Math Forum

January 3rd, 2011, 12:44 PM   #1
Newbie

Joined: Jan 2011

Posts: 2
Thanks: 0

I got this problem I have to find the solution for:

Quote:
 Find the no of distinct triplets(a,b,c) which satisfy the equation a^n+b^n=c^n a,b,c <=100 2<=n<=20 a,b,c are non-negative integers

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?

 January 3rd, 2011, 01:08 PM #2 Global Moderator   Joined: May 2007 Posts: 6,305 Thanks: 525 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, 01: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, 03:32 PM #4 Senior Member     Joined: Jul 2010 From: St. Augustine, FL., U.S.A.'s oldest city Posts: 12,155 Thanks: 462 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 non-negative integers where $m\ge n$ and k be a positive integer: $a=k$$m^2-n^2$$$ $b=k(2mn)$ $c=k$$m^2+n^2$$$ and $a=k(2mn)$ $b=k$$m^2-n^2$$$ $c=k$$m^2+n^2$$$ 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 co-prime and only one of them is odd. Hope this helps you get started.
January 4th, 2011, 09:22 AM   #5
Global Moderator

Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 933

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms

Your interpretation of the problem is correct.

Quote:
It's the problem that is naive, not you! It happens that there can be no solutions unless n = 2, but the problem is sneaky and doesn't mention this.

 Tags syntax, understand

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post bradhills Algebra 1 February 21st, 2013 12:48 PM goodjobbro Number Theory 13 December 25th, 2012 06:36 PM scrum Calculus 2 January 28th, 2010 12:33 AM johnny Algebra 1 July 21st, 2009 01:18 AM Williamson Calculus 5 July 13th, 2008 09:17 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top