My Math Forum  

Go Back   My Math Forum > College Math Forum > Number Theory

Number Theory Number Theory Math Forum


Thanks Tree9Thanks
Reply
 
LinkBack Thread Tools Display Modes
September 17th, 2018, 12:49 PM   #21
Senior Member
 
Joined: May 2016
From: USA

Posts: 1,148
Thanks: 479

Quote:
Originally Posted by Jopus View Post
Oh bummer Should be fixed finally now:


$$n^2 = [(1 - (-1)^n)/2] + [(1 + (-1)^n)/2] * [2 * (n + (1 - (-1)^n)/2)] + [2 *(n + (1 - (-1)^n)/2)] * [((n + (1 - (-1)^n)/2)/2) - 1]$$
Look at the third summand. To evaluate that, we shall have to multiply n by n. So this complex formula does not avoid the necessity to multiply n times n.
JeffM1 is offline  
 
September 17th, 2018, 12:56 PM   #22
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 13,282
Thanks: 931

Quote:
Originally Posted by Jopus View Post
But (-1)^n is only equal to -1 when n is odd; when n is even, it becomes equal to plus 1, and this is the crux of the formula, because it cancels out some terms as it goes to zero, and other terms are not cancelled out since 1 -(-1)^(odd power) is equal to 2.
Right! Missed that...to the corner I go...
Denis is offline  
September 17th, 2018, 01:15 PM   #23
Senior Member
 
Joined: May 2016
From: USA

Posts: 1,148
Thanks: 479

Quote:
Originally Posted by Denis View Post
Right! Missed that...to the corner I go...
Missing that is hardly relevant.

If n is even, the third summand is

$2(n)(0.5n - 1) = n^2 - 2n$, which essentially requires evaluating $n^2.$

If n is odd, the third summand is

$2(n + 1)(0.5n - 0.5) = n^2 - 1$, which essentialy requires evaluating $n^2.$

The whole thing is utterly pointless.
Thanks from Denis

Last edited by JeffM1; September 17th, 2018 at 01:23 PM.
JeffM1 is offline  
September 18th, 2018, 08:01 AM   #24
Senior Member
 
Joined: May 2016
From: USA

Posts: 1,148
Thanks: 479

OK. I am going to admit that I was guilty of slight hyperbole.

You CAN calculate $n^2$ without TECHNICALLY multiplying n by itself. There are probably an infinite number of ways to do so. The formula given will involve complex numbers if for example n = 1/2, but we safely stay in the rational numbers if n is an integer.

Under the formula, if n is even, the formula simplifies to

$\dfrac{1 - 1}{2} + \dfrac{1 + 1}{2} * 2 \left (n + \dfrac{1 - 1}{2} \right ) + 2 \left (n + \dfrac{1 - 1}{2} \right )\left ( \dfrac{n + \dfrac{1 - 1}{2}}{2} - 1 \right ) =$

$2n + 2n(0.5n - 1).$

Now obviously $2n + 2n(0.5 n - 1) = 2n + n^2 - 2n = n^2$,

but, given any even integer n, you can compute 2n and (0.5n - 1), multiply them together, and add the product to the previously calculated 2n to compute the square of n without actually ever multiplying n by itself.

Similarly if n is odd, the formula simplies to

$\dfrac{1 + 1}{2} + \dfrac{1 - 1}{2} * 2 \left (n + \dfrac{1 + 1}{2} \right ) + 2 \left (n + \dfrac{1 + 1}{2} \right )\left ( \dfrac{n + \dfrac{1 + 1}{2}}{2} - 1 \right ) =$

$1 + 2(n + 1)(0.5n - 0.5) = 1 + (n + 1)(n - 1).$

Now obviously

$1 + (n + 1)(n - 1) = 1 + n^2 - 1 = n^2$,

but, given any odd integer n, you can compute (n + 1) and (n - 1), multiply them together, and add 1 to that product to compute the square of n without actually ever multiplying n by itself.

As I mentioned before, if you do not restrict the formula to integers, you risk having to work with complex numbers. If you do restrict the formula to integers, it is confusingly and unnecessarily complex. It reduces to:

$n \text { is an even integer } \implies n^2 = 2n + 2n(0.5n - 1); \text { and }$

$n \text { is an odd integer } \implies n^2 = 1 + (n + 1)(n - 1).$

It is true, but it does not have any specified practical use or theoretical interest. There are an infinite number of ways to express a given number.
Thanks from Sebastian Garth
JeffM1 is offline  
September 18th, 2018, 08:59 AM   #25
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 13,282
Thanks: 931

Ya'll wanna have a good laugh at me?

I just realised that the problem was a way to square
a number without multiplying that number by itself. Duh!
I thought that Jopus was simply trying to SIMPLIFY...

To make up, here's the way to handle this:

n = number to be squared
r = random number

Are you ready? Here:
n^2 = nr - n(r - n)

NO Jeff, I ain't multiplying n by n: brackets are evaluated first
Thanks from JeffM1
Denis is offline  
September 18th, 2018, 11:16 AM   #26
Senior Member
 
Joined: May 2016
From: USA

Posts: 1,148
Thanks: 479

Quote:
Originally Posted by Denis View Post
Ya'll wanna have a good laugh at me?

I just realised that the problem was a way to square
a number without multiplying that number by itself. Duh!
I thought that Jopus was simply trying to SIMPLIFY...

To make up, here's the way to handle this:

n = number to be squared
r = random number

Are you ready? Here:
n^2 = nr - n(r - n)

NO Jeff, I ain't multiplying n by n: brackets are evaluated first
Exactly. There are an infinite number of ways to what he wants to do. Why he wants to do it is not disclosed, and why he wants to do it in that convoluted way is not disclosed.

Still, I am not sure why the stack exchange folks shut him down. I work at one of the stack exchanges (not the math one obviously), and I am voting not to shut things down all the time. Some people seem to think that the purpose of the stack exchange is to suppress questions. I actually got a question re-opened on Saturday. It was a minor triumph.
JeffM1 is offline  
September 18th, 2018, 05:15 PM   #27
Global Moderator
 
greg1313's Avatar
 
Joined: Oct 2008
From: London, Ontario, Canada - The Forest City

Posts: 7,878
Thanks: 1087

Math Focus: Elementary mathematics and beyond
Quote:
Originally Posted by Denis
I just realised that the problem was a way to square
a number without multiplying that number by itself.
Post #3.
Thanks from Denis
greg1313 is offline  
Reply

  My Math Forum > College Math Forum > Number Theory

Tags
explicitly, formula, performing



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
What formula should be used here? velasco10 Advanced Statistics 1 November 24th, 2014 07:41 AM
Formula help LordRaaa Algebra 3 May 15th, 2012 10:01 AM
Ito's formula Alex1 Algebra 0 October 29th, 2010 05:38 PM
De Moivre's formula and Newton's binomial formula agro Probability and Statistics 3 August 27th, 2009 06:17 AM
Looking for a formula wmoonw Algebra 1 January 16th, 2009 12:15 AM





Copyright © 2018 My Math Forum. All rights reserved.