9 billion names of God the integer

From Rosetta Code
Revision as of 14:08, 27 April 2013 by rosettacode>Dkf (Tidy up task description)
Task
9 billion names of God the integer
You are encouraged to solve this task according to the task description, using any language you may know.

This task is a variation of the short story by Arthur C. Clark. Solvers should be aware of the consequences of completing this task, see:

In detail, to specify what is meant by a “name”

The integer 1 has 1 name “1”.
The integer 2 has 2 names “1+1”, and 2.
The integer 3 has 3 names “1+1+1”, “2+1”, and “3”.
The integer 4 has 5 names “1+1+1+1”, “2+1+1”, “2+2”, “3+1”, “4”.
The integer 5 has 7 names “1+1+1+1+1”, “2+1+1+1”, “2+2+1”, “3+1+1”, “3+2”, “4+1”, “5”.
Task

The task is to display the first 25 rows of a number triangle which begins:

                                      1
                                    1   1
                                  1   1   1 
                                1   2   1   1
                              1   2   2   1   1
                            1   3   3   2   1   1

Where row corresponds to integer , and each column in row from left to right corresponds to the number of names begining with .

A function should return the sum of the names for that row. Demonstrate this function by displaying: , , , and .

Extra credit

If your environment is able, plot against for .