Code Golf Christmas Edition: How to print out a Christmas tree of height N Given a number N, how can I print out a Christmas tree of height N using the least number of code characters?  N is assumed constrained to a minimum value of 3, and a maximum value of 30 (bounds and error checking are not necessary). N is given as the one and only command line argument to your program or script.

All languages appreciated, if you see a language already implemented and you can make it shorter, edit if possible - comment otherwise and hope someone cleans up the mess.  Include newlines and White Spaces for clarity, but don't include them in the character count.

A Christmas tree is generated as such, with its "trunk" consisting of only a centered "*"

N = 3:

   *
  ***
 *****
   *


N = 4:

    *
   ***
  *****
 *******
    *


N = 5:

     *
    ***
   *****
  *******
 *********
     *


N defines the height of the branches not including the one line trunk.

Merry Christmas PPCG!
Brainfuck, 240 characters

              ,
             &gt;++
            +++++
           +[-&lt;---
          ---&gt;],[&gt;+
         +++++++[-&lt;-
        -----&gt;]&lt;&lt;[-&gt;+
       +++++++++&lt;]&gt;&gt;]&lt;
      [-&gt;+&gt;+&gt;&gt;&gt;&gt;&gt;&gt;&gt;+&lt;&lt;&lt;
     &lt;&lt;&lt;&lt;&lt;&lt;]&gt;&gt;&gt;&gt;++++++++
    [-&lt;++++&gt;]&gt;++++++[-&lt;++
   +++++&gt;]+&gt;&gt;&gt;++[-&lt;+++++&gt;]
  &lt;&lt;&lt;&lt;&lt;&lt;[-[&gt;.&lt;-]&lt;[-&lt;+&gt;&gt;+&lt;]&lt;
 [-&gt;+&lt;]&gt;&gt;&gt;&gt;&gt;[-&lt;.&gt;&gt;+&lt;]&gt;[-&lt;+&gt;]
&gt;.&lt;&lt;++&lt;&lt;&lt;-&lt;-&gt;]&gt;&gt;&gt;&gt;&gt;&gt;&gt;-[-&lt;&lt;&lt;&lt;&lt;
           &lt;.&gt;&gt;&gt;
           &gt;&gt;&gt;]&lt;
           &lt;&lt;&lt;&lt;.


Not yet done.  It works, but only with single-digit numbers.

EDIT: Done!  Works for interpreters using 0 as EOF.  See NOTEs in commented source for those with -1.

EDIT again: I should note that because Brainfuck lacks a standard method for reading command line arguments, I used stdin (standard input) instead.  ASCII, of course.

EDIT a third time: Oh dear, it seems I stripped . (output) characters when condensing the code.  Fixed...

Here's the basic memory management of the main loop.  I'm sure it can be heavily optimized to reduce the character count by 30 or so.


Temporary
Copy of counter
Counter (counts to 0)
Space character (decimal 32)
Asterisk character (decimal 42)
Number of asterisks on current line (1 + 2*counter)
Temporary
New line character
Temporary?
Total number of lines (i.e. input value; stored until the very end, when printing the trunk)


Condensed version:

,&gt;++++++++[-&lt;------&gt;],[&gt;++++++++[-&lt;------&gt;]&lt;&lt;[-&gt;++++++++++&lt;]&gt;&gt;]&lt;[-&gt;+&gt;+&gt;&gt;&gt;&gt;&gt;&gt;&gt;+&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;]&gt;&gt;&gt;&gt;++++++++[-&lt;++++&gt;]&gt;++++++[-&lt;+++++++&gt;]+&gt;&gt;&gt;++[-&lt;+++++&gt;]&lt;&lt;&lt;&lt;&lt;&lt;[-[&gt;.&lt;-]&lt;[-&lt;+&gt;&gt;+&lt;]&lt;[-&gt;+&lt;]&gt;&gt;&gt;&gt;&gt;[-&lt;.&gt;&gt;+&lt;]&gt;[-&lt;+&gt;]&gt;.&lt;&lt;++&lt;&lt;&lt;-&lt;-&gt;]&gt;&gt;&gt;&gt;&gt;&gt;&gt;-[-&lt;&lt;&lt;&lt;&lt;&lt;.&gt;&gt;&gt;&gt;&gt;&gt;]&lt;&lt;&lt;&lt;&lt;.


And the pretty version:

ASCII to number
,&gt;
++++++++[-&lt;------&gt;]  = 48 ('0')

Second digit (may be NULL)
,
NOTE:   Add plus sign here if your interpreter uses negative one for EOF
[ NOTE: Then add minus sign here
 &gt;++++++++[-&lt;------&gt;]
 &lt;&lt;[-&gt;++++++++++&lt;]&gt;&gt;  Add first digit by tens
]

Duplicate number
&lt;[-&gt;+&gt;+&gt;&gt;&gt;&gt;&gt;&gt;&gt;+&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;]&gt;&gt;

Space char
&gt;&gt;++++++++[-&lt;++++&gt;]

Asterisk char
&gt;++++++[-&lt;+++++++&gt;]

Star count
+

New line char
&gt;&gt;&gt;++[-&lt;+++++&gt;]&lt;&lt;&lt;

&lt;&lt;&lt;

Main loop
[
Print leading spaces
-[&gt;.&lt;-]

Undo delete
&lt;[-&lt;+&gt;&gt;+&lt;]
&lt;[-&gt;+&lt;]
&gt;&gt;

Print stars
&gt;&gt;&gt;[-&lt;.&gt;&gt;+&lt;]

Add stars and print new line
&gt;[-&lt;+&gt;]
&gt;.&lt;
&lt;++

&lt;&lt;&lt;

-&lt;-&gt;
End main loop
]

Print the trunk
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
-[-&lt;&lt;&lt;&lt;&lt;&lt;.&gt;&gt;&gt;&gt;&gt;&gt;]
&lt;&lt;&lt;&lt;&lt;.

Merry Christmas =)