This task is a variation of the [[wp:The Nine Billion Names of God#Plot_summary|short story by Arthur C. Clarke]].

(Solvers should be aware of the consequences of completing this task.)

In detail, to specify what is meant by a &nbsp; “name”:
:The integer 1 has 1 name  &nbsp; &nbsp;  “1”.
:The integer 2 has 2 names &nbsp; “1+1”, &nbsp; and &nbsp; “2”.
:The integer 3 has 3 names &nbsp; “1+1+1”, &nbsp; “2+1”, &nbsp; and &nbsp; “3”.
:The integer 4 has 5 names &nbsp; “1+1+1+1”, &nbsp; “2+1+1”, &nbsp; “2+2”, &nbsp; “3+1”, &nbsp; “4”.
:The integer 5 has 7 names &nbsp; “1+1+1+1+1”, &nbsp; “2+1+1+1”, &nbsp; “2+2+1”, &nbsp; “3+1+1”, &nbsp; “3+2”, &nbsp; “4+1”, &nbsp; “5”.


;Task
Display the first 25 rows of a number triangle which begins:
<pre>
                                      1
                                    1   1
                                  1   1   1
                                1   2   1   1
                              1   2   2   1   1
                            1   3   3   2   1   1
</pre>

Where row &nbsp; <math>n</math> &nbsp; corresponds to integer &nbsp; <math>n</math>, &nbsp; and each column &nbsp; <math>C</math> &nbsp; in row &nbsp; <math>m</math> &nbsp; from left to right corresponds to the number of names beginning with &nbsp; <math>C</math>.

A function &nbsp; <math>G(n)</math> &nbsp; should return the sum of the &nbsp; <math>n</math>-th &nbsp; row.

Demonstrate this function by displaying: &nbsp; <math>G(23)</math>, &nbsp; <math>G(123)</math>, &nbsp; <math>G(1234)</math>, &nbsp; and &nbsp; <math>G(12345)</math>.

Optionally note that the sum of the &nbsp; <math>n</math>-th &nbsp; row &nbsp; <math>P(n)</math> &nbsp; is the &nbsp;  [http://mathworld.wolfram.com/PartitionFunctionP.html &nbsp; integer partition function].

Demonstrate this is equivalent to &nbsp; <math>G(n)</math> &nbsp; by displaying: &nbsp; <math>P(23)</math>, &nbsp; <math>P(123)</math>, &nbsp; <math>P(1234)</math>, &nbsp; and &nbsp; <math>P(12345)</math>.


;Extra credit

If your environment is able, plot &nbsp; <math>P(n)</math> &nbsp; against &nbsp; <math>n</math> &nbsp; for &nbsp; <math>n=1\ldots 999</math>.
<br><br>
