An interesting math formula to share

2018-07-10 Thread ToddAndMargo
Hi All, Remembering from my school days, a famous mathematician whose name I forget came up with a formula as a kid that made math history. As it transpires, when in school, they disciplined him by making his count all the number from 1 to some large number. It took him only a few minutes. The

Re: An interesting math formula to share

2018-07-10 Thread Thomas Klausner
Hi! On Tue, Jul 10, 2018 at 02:02:45AM -0700, ToddAndMargo wrote: > Remembering from my school days, a famous mathematician > whose name I forget came up with a formula as a kid > that made math history. https://en.wikipedia.org/wiki/Carl_Friedrich_Gauss greetings, domm -- #!/usr/bin/perl

Re: An interesting math formula to share

2018-07-10 Thread Shlomi Fish
Hi Todd! On Tue, 10 Jul 2018 02:02:45 -0700 ToddAndMargo wrote: > Hi All, > > Remembering from my school days, a famous mathematician > whose name I forget came up with a formula as a kid > that made math history. > See https://en.wikipedia.org/wiki/Arithmetic_progression . They tell this sto

Re: An interesting math formula to share

2018-07-10 Thread Brian Duggan
On Tuesday, July 10, ToddAndMargo wrote: > $ echo "5" | p6 'my $N=slurp(); say $N*($N+1)/2;' > 15 > > $ echo "6" | p6 'my $N=slurp(); say $N*($N+1)/2;' > 21 > > $ echo "100" | p6 'my $N=slurp(); say $N*($N+1)/2;' > 5050 Another cool thing is that this formula is used in Perl 6 under the hood to

Re: An interesting math formula to share

2018-07-10 Thread ToddAndMargo
On 07/10/2018 02:47 AM, Shlomi Fish wrote: Hi Todd! On Tue, 10 Jul 2018 02:02:45 -0700 ToddAndMargo wrote: Hi All, Remembering from my school days, a famous mathematician whose name I forget came up with a formula as a kid that made math history. See https://en.wikipedia.org/wiki/Arithmet

Re: An interesting math formula to share

2018-07-10 Thread ToddAndMargo
On 07/10/2018 03:42 AM, Brian Duggan wrote: On Tuesday, July 10, ToddAndMargo wrote: $ echo "5" | p6 'my $N=slurp(); say $N*($N+1)/2;' 15 $ echo "6" | p6 'my $N=slurp(); say $N*($N+1)/2;' 21 $ echo "100" | p6 'my $N=slurp(); say $N*($N+1)/2;' 5050 Another cool thing is that this formula is u

Re: An interesting math formula to share

2018-07-10 Thread Darren Duncan
Your saying "count all the number" is confusing and doesn't seem to relate to what follows. Did you mean to say "sum all the number"? -- Darren Duncan On 2018-07-10 2:02 AM, ToddAndMargo wrote: Hi All, Remembering from my school days, a famous mathematician whose name I forget came up with a

Re: An interesting math formula to share

2018-07-10 Thread ToddAndMargo
On 2018-07-10 2:02 AM, ToddAndMargo wrote: Hi All, Remembering from my school days, a famous mathematician whose name I forget came up with a formula as a kid that made math history. As it transpires, when in school, they disciplined him by making his count all the number from 1 to some large n