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, 07:22 AM   #1
Member
 
Joined: Feb 2013
From: London, England, UK

Posts: 37
Thanks: 1

Formula for n^2 without explicitly performing n*n:

I am reposting this here, because it's being shut down on Maths Stack Exchange. There's some snobby people on there who don't like stuff like this. Thanks!!


Formula for n^2 without explicitly performing n*n:

$$n^2 = [(1 - (-1)^n)/2] + [(1 + (-1)^n)/2] * [4 * ({n + (1 - (-1)^n)/2}/2)] + [4 * ({n + (1 - (-1)^n)/2}/2)] * [({n + (1 - (-1)^n)/2}/2) - 1]$$

That's it. Hopefully, I've not made any errors in it.

Here's a simplified version:

Let s = (1 - (-1)^n)/2 ; and t = (1 + (-1)^n)/2

Then, expression for n^2 is as follows:

n^2 = s + t * 4 * ((n + s)/2) + 4 * ((n + s)/2) * ((n + s)/2 - 1)
Jopus is offline  
 
September 17th, 2018, 09:18 AM   #2
Senior Member
 
mrtwhs's Avatar
 
Joined: Feb 2010

Posts: 692
Thanks: 132

Perhaps they are not snobby. Maybe they just don't see the point.

Is this supposed to be more efficient for a computer or calculator? I don't have the requisite expertise to answer that. If this is your claim, then post some data so that the computer gurus on this site can assess the efficiency of your claim.

If this is supposed to be more efficient for a human, then I would try $\displaystyle n^2=(n-d)(n+d)+d^2$. For a well chosen small value of $\displaystyle d$, you can square $\displaystyle n$ in your head.

If it is neither of these, then you should really say what the point is.
mrtwhs is offline  
September 17th, 2018, 09:21 AM   #3
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
$$n^2=\sum_{k=1}^n(2k-1)$$
Thanks from Sebastian Garth and JeffM1
greg1313 is offline  
September 17th, 2018, 09:27 AM   #4
Member
 
Joined: Feb 2013
From: London, England, UK

Posts: 37
Thanks: 1

@mrtwhs

The point isn't that there is no point. But equally, need everything have a point? I'm not making any claims, it's a statement of fact. I don't need a disclaimer because nothing is being claimed. I simply chanced upon this as I was doing other research, thought it might be interesting or useful to someone at some point, so posted it. I personally have no real use for it, but felt, perhaps misguidedly, that it might be of utility to others.
Jopus is offline  
September 17th, 2018, 09:37 AM   #5
Senior Member
 
mrtwhs's Avatar
 
Joined: Feb 2010

Posts: 692
Thanks: 132

Quote:
Originally Posted by Jopus View Post
@mrtwhs

The point isn't that there is no point. But equally, need everything have a point? I'm not making any claims, it's a statement of fact. I don't need a disclaimer because nothing is being claimed. I simply chanced upon this as I was doing other research, thought it might be interesting or useful to someone at some point, so posted it. I personally have no real use for it, but felt, perhaps misguidedly, that it might be of utility to others.
OK! Cool! But I am curious ... what did the other board do that made you think they were snobby?
mrtwhs is offline  
September 17th, 2018, 09:47 AM   #6
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 13,282
Thanks: 931

Quote:
Originally Posted by Jopus View Post
Formula for n^2 without explicitly performing n*n:

$$n^2 = [(1 - (-1)^n)/2] + [(1 + (-1)^n)/2] * [4 * ({n + (1 - (-1)^n)/2}/2)] + [4 * ({n + (1 - (-1)^n)/2}/2)] * [({n + (1 - (-1)^n)/2}/2) - 1]$$
Why do you not simply say: simplify right side ?

Last edited by Denis; September 17th, 2018 at 09:51 AM.
Denis is offline  
September 17th, 2018, 10:01 AM   #7
Member
 
Joined: Feb 2013
From: London, England, UK

Posts: 37
Thanks: 1

@mrtwhs

Sorry, I wasn't trying to be surly or anything. It's just that a few people on the MSE website basically shut the question down. I can't see that there's a good reason. I'm not saying it's all that useful, just that it might be, in case someone is looking for some such thing at some point in the future. Speaking from personal experience, I often encounter interesting things in maths which seem irrelevant to the matter at hand at a particular juncture of research, but the trick is to write them up semi-neatly, and then archive the little result, no matter how trifling or seemingly insignificant. Then invariably, some other avenue opens up down the road, at which point the little finding becomes useful and applicable.
Jopus is offline  
September 17th, 2018, 10:07 AM   #8
Senior Member
 
mrtwhs's Avatar
 
Joined: Feb 2010

Posts: 692
Thanks: 132

Quote:
Originally Posted by Jopus View Post
Formula for n^2 without explicitly performing n*n:

$$n^2 = [(1 - (-1)^n)/2] + [(1 + (-1)^n)/2] * [4 * ({n + (1 - (-1)^n)/2}/2)] + [4 * ({n + (1 - (-1)^n)/2}/2)] * [({n + (1 - (-1)^n)/2}/2) - 1]$$

Here's a simplified version:

Let s = (1 - (-1)^n)/2 ; and t = (1 + (-1)^n)/2

Then, expression for n^2 is as follows:

n^2 = s + t * 4 * ((n + s)/2) + 4 * ((n + s)/2) * ((n + s)/2 - 1)
Well these don't match. I substituted $\displaystyle n=3$ into the bottom formula and correctly got $\displaystyle 3^2=9$.

However the top formula gave $\displaystyle 3^2=36$.

I think there is a typo in the top formula.
mrtwhs is offline  
September 17th, 2018, 10:13 AM   #9
Senior Member
 
Joined: Aug 2012

Posts: 2,040
Thanks: 581

Quote:
Originally Posted by mrtwhs View Post
Perhaps they are not snobby.
Math.stackexchange is snobby. In a good cause, since there are professional mathematicians there answering technical questions. But snobby for sure. No sense of humor, no discussions, no poorly phrased questions allowed, etc.
Maschke is offline  
September 17th, 2018, 10:18 AM   #10
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 13,282
Thanks: 931

Quote:
Originally Posted by Jopus View Post
$$n^2 = [(1 - (-1)^n)/2] + [(1 + (-1)^n)/2] * [4 * ({n + (1 - (-1)^n)/2}/2)] + [4 * ({n + (1 - (-1)^n)/2}/2)] * [({n + (1 - (-1)^n)/2}/2) - 1]$$
...may we ask what does this ridiculously long equation represent?
Why stuff like /2/2 and not /4?
Denis 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.