Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hello folks!

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

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

In reply to [OT] math fulguration by Discipulus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-03-29 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found