Discipulus has asked for the wisdom of the Perl Monks concerning the following question:
I had a mathematical fulguration (is rare because I have troubles with two digits divisions..) and I'd like to know if this is a known fact. In English it goes like:
> The n power of a number a is equal to 1 plus the summation from a**n-1 to a**0 multiplied by n-1
I'm not able to draw it in nice math signs, but in perl is like:
perl -E "map{ $sigma += $ARGV[0]**$_ }0..$ARGV[1]-1; say 'true' if $AR +GV[0]**$ARGV[1] == 1+( $sigma * ($ARGV[0]-1))"
In the chat choroba was so kind to prove it mathematically (I leave to him the right to point to that ;)
I proved empirically and works also for powers of 2 (which I already known the formula and in my case becomes a reduced form as it implies * 1 ) and for powers of 1 where it implies * 0
It also works for n**1 and n**0 so it seems a nice generalisation.
Incidentally, there is a nicer way to do the above Σ in perl?
Does some mathematician knows if the above fulguration I had is a known fact?
L*
PS fixed English formula using choroba fix below
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: [OT] math fulguration
by salva (Canon) on Apr 06, 2021 at 14:27 UTC | |
Re: [OT] math fulguration
by choroba (Cardinal) on Apr 06, 2021 at 13:56 UTC | |
by LanX (Saint) on Apr 06, 2021 at 21:20 UTC | |
by AnomalousMonk (Archbishop) on Apr 06, 2021 at 22:01 UTC | |
by LanX (Saint) on Apr 06, 2021 at 22:44 UTC | |
by AnomalousMonk (Archbishop) on Apr 06, 2021 at 23:03 UTC | |
| |
by choroba (Cardinal) on Apr 06, 2021 at 22:24 UTC | |
by syphilis (Archbishop) on Apr 06, 2021 at 22:35 UTC | |
by Aldebaran (Curate) on Apr 07, 2021 at 01:03 UTC | |
Re: [OT] math fulguration
by jo37 (Deacon) on Apr 06, 2021 at 14:35 UTC | |
Re: [OT] math fulguration
by duelafn (Parson) on Apr 07, 2021 at 12:22 UTC | |
by salva (Canon) on Apr 07, 2021 at 12:55 UTC | |
by jo37 (Deacon) on Apr 07, 2021 at 17:06 UTC | |
Re: [OT] math fulguration
by talexb (Chancellor) on Apr 06, 2021 at 13:56 UTC | |
by choroba (Cardinal) on Apr 06, 2021 at 14:29 UTC | |
by talexb (Chancellor) on Apr 06, 2021 at 17:23 UTC | |
by hippo (Bishop) on Apr 06, 2021 at 14:26 UTC |