Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Write any natural number as sum of three triangular numbers

by CountZero (Bishop)
on Sep 25, 2011 at 12:07 UTC ( [id://927743]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Modern::Perl;
    use Algorithm::Combinatorics qw /variations_with_repetition/;
    use List::Util qw /sum/;
    ...
    
    say "$_ = $results[$_]" for 0 .. 80;
    
  2. or download this
    0 = 0 + 0 + 0
    1 = 1 + 0 + 0
    2 = 1 + 1 + 0
    ...
    78 = 78 + 0 + 0
    79 = 78 + 1 + 0
    80 = 78 + 1 + 1
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://927743]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-19 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found