My Math Forum  

Go Back   My Math Forum > Math Forums > Math

Math General Math Forum - For general math related discussion and news


Thanks Tree8Thanks
Reply
 
LinkBack Thread Tools Display Modes
April 5th, 2018, 02:01 PM   #1
Newbie
 
Joined: Apr 2018
From: Canada

Posts: 10
Thanks: 0

Question Is it possible?

Hi, I am new here and I see this is a pretty active place!

I've been wondering about how difficult it is to find the 2 squares that are the "difference of 2 squares" for a given number.

Example
100 = (26 squared) - (24 squared)

Given any number, is there a formula to find what those 2 squared numbers are?

thanks for anyone replying to this, have a great weekend!!
Clonus is offline  
 
April 5th, 2018, 02:47 PM   #2
SDK
Senior Member
 
Joined: Sep 2016
From: USA

Posts: 443
Thanks: 254

Math Focus: Dynamical systems, analytic function theory, numerics
The difference of two squares always factors like
\[n^2 - m^2 = (n + m)(n - m) \]
so if the term on the right side is equal to your number, then $n+m$ and $n-m$ are a pair of factors. In your example, $n = 26, m = 24$ and indeed $26 - 24 = 2$ and $26 + 24 = 50$ and $50 \cdot 2 = 100$.
SDK is offline  
April 5th, 2018, 03:11 PM   #3
Newbie
 
Joined: Apr 2018
From: Canada

Posts: 10
Thanks: 0

Hey thank you for your reply, I appreciate it! ... however I am not sure I understand how I determine what the squares are by just having 100.

What would the answer be for let's say...

57,671 ?

Where would I start attempting to find the 1st square?

Last edited by skipjack; April 27th, 2018 at 11:33 PM.
Clonus is offline  
April 5th, 2018, 03:47 PM   #4
Math Team
 
Joined: Dec 2013
From: Colombia

Posts: 7,398
Thanks: 2477

Math Focus: Mainly analysis and algebra
Quote:
Originally Posted by Clonus View Post
I've been wondering about how difficult it is to find the 2 squares that are the "difference of 2 squares" for a given number.
These are Pythagorean Triples.

For any coprime, odd $s$ and $t$, $$a=\frac{s^2-t^2}2, \; b=st, \; c=\frac{s^2+t^2}2$$ is a primitive Pythagorean Triple (meaning that $a$, $b$ and $c$ do not all share a common factor. Moreover, all primitive Pythagorean Triples are generated by the scheme.
Thanks from Maschke, topsquark and SDK
v8archie is online now  
April 5th, 2018, 03:56 PM   #5
Newbie
 
Joined: Apr 2018
From: Canada

Posts: 10
Thanks: 0

Ok you just blew my mind, I'm not that advanced at Math.

I suppose a simple basic answer would be best for me. I assume it's not a simple answer and determining either of the squares requires some sort of brute force technique ?
Clonus is offline  
April 5th, 2018, 04:17 PM   #6
SDK
Senior Member
 
Joined: Sep 2016
From: USA

Posts: 443
Thanks: 254

Math Focus: Dynamical systems, analytic function theory, numerics
Quote:
These are Pythagorean Triples.

For any coprime, odd $s$ and $t$, $$a=\frac{s^2-t^2}2, \; b=st, \; c=\frac{s^2+t^2}2$$ is a primitive Pythagorean Triple (meaning that $a$, $b$ and $c$ do not all share a common factor. Moreover, all primitive Pythagorean Triples are generated by the scheme.
I don't think he intended to ask for Pythagorean triples. I think the choice of 100 in his example was coincidentally a square.

Quote:
What would the answer be for let's say...

57,671 ?
$57,671$ factors as $101 \cdot 571$ so you would solve $n+m = 571, n-m = 101$ which has solution $m = 235, n = 336$. You can check that $336^2 - 235^2 = 57,671$
Thanks from Maschke, topsquark and v8archie

Last edited by skipjack; April 27th, 2018 at 11:34 PM.
SDK is offline  
April 5th, 2018, 04:17 PM   #7
Senior Member
 
Joined: Aug 2012

Posts: 2,010
Thanks: 574

Quote:
Originally Posted by Clonus View Post
Ok you just blew my mind, I'm not that advanced at Math.

I suppose a simple basic answer would be best for me.
I will try to provide an explanatory walkthrough of @v8archie's post.

Quote:
Originally Posted by Clonus View Post
What would the answer be for let's say...

57,671 ?
I have a question for you. How do you know this number can be written as a difference of squares at all?

Now that, as it turns out, is a very sophisticated question. It's the kind of question mathematicians ask themselves.

What v8archie pointed out is that the numbers that can be written as the difference of squares are exactly those numbers that are members of Pythagorean triples.

For example we all know that $3^2 + 4^2 = 5^2$ because $9 + 16 = 25$. This is a very famous Pythagorean triple. We can rewrite it as $3^2 = 5^2 - 4^2$. So $9$ is a difference of squares. You can see that every Pythagorean triple gives rise to (a couple of) examples of numbers that are differences of squares.

On the other hand, suppose $a^2 = b^2 - c^2$, a number that's a difference of squares.. Then you can see how it easily turns into a Pythagorean triple by moving the $c^2$ term to the left.

Finding all the numbers that are the difference of squares is exactly the same problem as finding all the Pythagorean triples. This is a great example of how mathematicians think. You solve a problem by recognizing that it's actually some other problem that you already know the answer to.

Hope this Cliff Notes to v8archie's post was helpful. [Do they still use Cliff Notes these days? Or does everyone just go with the 140-character summary? "Disabled guy hunts endangered whale and gets what's coming to him."]
Thanks from topsquark

Last edited by skipjack; April 27th, 2018 at 11:37 PM.
Maschke is online now  
April 5th, 2018, 04:27 PM   #8
Newbie
 
Joined: Apr 2018
From: Canada

Posts: 10
Thanks: 0

Quote:
Originally Posted by Maschke View Post
I will try to provide an explanatory walkthrough of @v8archie's post.



I have a question for you. How do you know this number can be written as a difference of squares at all?
Number 57671

Now that, as it turns out, is a very sophisticated question. It's the kind of questions mathematicians ask themselves.

What v8archie pointed out is that the numbers that can be written as the difference of squares are exactly those numbers that are members of Pythagorean triples.

For example we call know that $3^2 + 4^2 = 5^2$ because $9 + 16 = 25$. This is a very famous Pythagorean triple. We can rewrite it as $9^2 = 5^2 - 4^2$. So $9$ is a difference of squares. So every Pythagorean triple gives rise to (a couple of) examples of numbers that are differences of squares.

On the other hand, suppose $a^2 = b^2 - c^2$. Then you can see how it easily turns into a Pythagorean triple by moving the $c^2$ term to the left.

So the question of which numbers can be written as a difference of squares, turns out to be identical to the question of finding all the Pythagorean triples, which v8Archie showed how to do.

Hope this Cliff Notes to v8archie's post was helpful. [Do they still use Cliff Notes these days? Or does everyone just go with the 140-character summary? "Disabled guy hunts endangered whale and gets what's coming to him."]
The interesting thing about all of this is that if there was a quick way of determining the 2 squares you could easily find at least 1 factor of a number. In the case of Semi-Primes this would be a break through no?

I'm not a math student or even have much more than basic math skills, but I do very much look for anomalies in math by using patterns that I discovery often.. I found something interesting so I wanted to understand how easy it was to find the "difference of 2 squares" given the number.

Clonus is offline  
April 5th, 2018, 04:32 PM   #9
Math Team
 
topsquark's Avatar
 
Joined: May 2013
From: The Astral plane

Posts: 1,888
Thanks: 765

Math Focus: Wibbly wobbly timey-wimey stuff.
Quote:
Originally Posted by Maschke View Post
Hope this Cliff Notes to v8archie's post was helpful.
The call them Brown music now. (Cliff Brown...notes music) Hahahahaha...hahaha...ha...ha.

-Dan
topsquark is offline  
April 5th, 2018, 04:35 PM   #10
Newbie
 
Joined: Apr 2018
From: Canada

Posts: 10
Thanks: 0

As for whether or not this number has an answer, yes it does but I have a very long winded way of doing it but it requires you to know the factors,, if you know the factors then getting the 2 squares is easy. I just want to know if it's possible to do it the other way.

57671 = 336(2) - 235(2)

I suppose, if there was an easy way to get the squares without the factors then I could simply reverse the same pattern I found and get the factors.

I don't talk "math" as I'm very basically educated in it, however, I do spend countless hours playing with patterns of math and I've found so many cool things about it.. it's simply discovery of things math, very satisfying.
Clonus is offline  
Reply

  My Math Forum > Math Forums > Math



Thread Tools
Display Modes






Copyright © 2018 My Math Forum. All rights reserved.