From users-return-4775-apmail-openoffice-users-archive=openoffice.apache.org@openoffice.apache.org Sat Jun 22 17:18:03 2013
Return-Path:
X-Original-To: apmail-openoffice-users-archive@www.apache.org
Delivered-To: apmail-openoffice-users-archive@www.apache.org
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
by minotaur.apache.org (Postfix) with SMTP id 66380CE0C
for ; Sat, 22 Jun 2013 17:18:03 +0000 (UTC)
Received: (qmail 92787 invoked by uid 500); 22 Jun 2013 17:18:02 -0000
Delivered-To: apmail-openoffice-users-archive@openoffice.apache.org
Received: (qmail 92653 invoked by uid 500); 22 Jun 2013 17:18:02 -0000
Mailing-List: contact users-help@openoffice.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: users@openoffice.apache.org
Delivered-To: mailing list users@openoffice.apache.org
Received: (qmail 92409 invoked by uid 99); 22 Jun 2013 17:18:02 -0000
Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230)
by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Jun 2013 17:18:02 +0000
X-ASF-Spam-Status: No, hits=-0.0 required=5.0
tests=RCVD_IN_DNSWL_NONE,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (nike.apache.org: domain of dennis.hamilton@acm.org designates 216.119.133.2 as permitted sender)
Received: from [216.119.133.2] (HELO a2s42.a2hosting.com) (216.119.133.2)
by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Jun 2013 17:17:54 +0000
Received: from 71-217-92-7.tukw.qwest.net ([71.217.92.7]:33315 helo=Astraendo2)
by a2s42.a2hosting.com with esmtpa (Exim 4.80)
(envelope-from )
id 1UqRRN-003fe7-8B
for users@openoffice.apache.org; Sat, 22 Jun 2013 13:17:33 -0400
Reply-To:
From: "Dennis E. Hamilton"
To:
References: <51C46819.5000304@gmail.com> <51C49B1A.8020405@gmail.com> <21286.11322.bm@smtp105.bt.mail.ir2.yahoo.com> <51C4D63A.40806@gmail.com>
In-Reply-To:
Subject: RE: Calc: Easy way to do N+(N-1)+(N-2)+(N-3)..(N-N+1)
Date: Sat, 22 Jun 2013 10:17:33 -0700
Organization: NuovoDoc
Message-ID: <005e01ce6f6c$62f41ec0$28dc5c40$@acm.org>
MIME-Version: 1.0
Content-Type: text/plain;
charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 15.0
Thread-Index: AQKxy/66VYQU/26WtcmDravwos3StQKWe+PqAW3eZSECLKTAtwKrbVWYlzRNODA=
Content-Language: en-us
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - a2s42.a2hosting.com
X-AntiAbuse: Original Domain - openoffice.apache.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - acm.org
X-Get-Message-Sender-Via: a2s42.a2hosting.com: authenticated_id: himself+orcmid.com/only user confirmed/virtual account not confirmed
X-Virus-Checked: Checked by ClamAV on apache.org
Yes, the proof is now taught in elementary school, as I recall. It was =
the first one I ever learned to do.
It clearly does work, with adjustment, for ranges starting with other =
than 1, and it works with negative numbers too. It also doesn't matter =
whether you are counting down or counting up, because it is symmetrical =
as far as addition is concerned. =20
To go from m to n, assume m is not larger than n. If not, simply =
interchange them since the summation taken in either direction is the =
same.
Write down the numbers=20
m, m+1, ..., n-1, n
n, n-1, ..., m+1, m
Each of those rows lists the numbers to be added, but in reversed =
sequence, as Rob shows, below.
Notice that each vertical pair adds up to precisely m+n.
Satisfy yourself that there are exactly n-m+1 pairs (the columns) like =
that. Notice that works for m=3Dn too.
So the sum of all the numbers (using both rows) is (n-m+1)*(m+n)
But that's double the sum of just one of the rows. The sum of just one =
of those rows, either one,
is (n-m+1)*(m+n)/2. (The sum over both rows must be an even number so =
the division always work.)
Notice that m=3D0 and m=3D1 fall out as having the same results.
- Dennis
PS: That's why there is no need for a special function in OpenFormula to =
accomplish this. Gauss showed that it is not hard. I once owned a book =
that had many simplified formulas for series and summations. It's =
probably still available from Dover Publications. Or just use Internet =
Search and find Wikipedia articles and YouTube videos about them.
PPS: In elementary school, our principal gave out a problem based on the =
story of the fellow who was to be rewarded by a king and had asked for =
grains of wheat to be put on the squares of a chess board (64 squares) =
with 1 on the first square, 2 on the second, 4 on the third, etc., until =
the end. In the story, the fellow was rewarded by beheading. Our =
school principal wanted to know how may grains of wheat would have been =
awarded. Every software developer should know the shortcut, that =
requires only doublings and one subtraction. You never have to add up =
all of the individual numbers, so the chance for error is significantly =
reduced. I didn't figure that out, but the principal showed me when I =
took in my clumsy column of numbers. At that time, commercial computers =
were just coming out, so binary arithmetic was not widely-known.
-----Original Message-----
From: Rob Weir [mailto:robweir@apache.org]=20
Sent: Saturday, June 22, 2013 07:54 AM
To: users@openoffice.apache.org
Subject: Re: Calc: Easy way to do N+(N-1)+(N-2)+(N-3)..(N-N+1)
On Fri, Jun 21, 2013 at 6:39 PM, Toki Kantoor =
wrote:
> On 06/21/2013 06:37 PM, Brian Barker wrote:
>> Yes. Sigma (1 to n) is n(n+1)/2.
>
> Thanks.
>
>>> If so, what is the formula, extension, or something?
>>
>> =3DXn*(Xn+1)/2
>>
>> I trust this helps.
>
> It helps a lot.
There is a famous story about this formula. The mathematician Carl
Friedrich Gauss, when he was 10 years old, was in an arithmetic class
where the teacher gave them all the problem to sum the digits from 1
to 100.
Maybe the teacher had some other task he wanted to do, or wanted to
take a nap? So he gave them this task to keep them busy.
Gauss figured this out in his head (the answer is 5050), by
discovering the above formula, and put down his slate, much angering
the teacher.
The key is to rearrange the calculation. So instead of
1+2+3+4...+100, think of it as: (1+100) + (2+99) + (3+98) ... +
(49+52) + (50+51) =3D 101*50
Regards,
-Rob
> I wish I had book that contained functions and their formula, that
> somebody that never took a match course could understand.
>
> jonathon
> --
> LibreOffice in a Multi-Lingual Environment.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: users-help@openoffice.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@openoffice.apache.org
For additional commands, e-mail: users-help@openoffice.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@openoffice.apache.org
For additional commands, e-mail: users-help@openoffice.apache.org