[Question]
  [
**This question already has answers here**:
 
 
[Code Golf Christmas Edition: How to print out a Christmas tree of height N](/questions/4244/code-golf-christmas-edition-how-to-print-out-a-christmas-tree-of-height-n)
 (116 answers)
 
Closed 4 years ago.
Given an integer `n>0`, write a program that will output an "isosceles" Triangle out of #'s of height `n`.
Examples:
`n=3`
```
  #  
 ### 
#####
```
`n=1`
```
#
```
`n=5`
```
    #    
   ###   
  #####  
 ####### 
#########
```
This would be invalid:
```
#
###
#####
#######
#########
```
  
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 5 bytes
```
Ｇ↗↘Ｎ#
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z8gP6cyPT9Pwyq0ICgzPaNER8HKJb88D8r2zCsoLfErzU1KLdLQ1FFQUlbStP7/3/S/blkOAA "Charcoal – Try It Online") Link is to verbose version of code. Explanation: The `Ｇ` draws a filled polygon, where the `↗↘` specifies the sides to follow (the polygon is automatically closed) and the `Ｎ` inputs the size and the `#` specifies the fill character. Using `Ｇ↖↙Ｎ#` also works of course.
Alternate solution, also 5 bytes:
```
Ｇ^Ｎ#⟲
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z8gP6cyPT9PwypOR8Ezr6C0xK80Nym1SENTR0FJWUnTmisovySxJFVD0/r/f9P/umU5AA "Charcoal – Try It Online") Link is to verbose version of code. Explanation: The `^` is a shortcut for two diagonal directions `↘↙` (sadly there is no shortcut for the above diagonals in the required order as `<` is `↘↗` and `>` is `↙↖`) so the triangle has to be rotated into position using `⟲`.
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 36 bytes
```
"$args"..1|%{" "*--$_+"#"*++$i;$i++}
```
[Try it online!](https://tio.run/##K8gvTy0qzkjNyfn/X0klsSi9WElPz7BGtVpJQUlLV1clXltJWUlLW1sl01olU1u79v///yYA "PowerShell – Try It Online")
Loops from input `$args` down to `1`, each iteration constructing a string consisting of the appropriate number of spaces plus a number of `#` marks that starts at `1` and increments by 2 every iteration. Those strings are left on the pipeline, and implicit output gives us newlines for free.
[Answer]
# [Python 2](https://docs.python.org/2/), 46 bytes
```
def f(n,i=1):1/n;print" "*~-n+"#"*i;f(n-1,i+2)
```
[Try it online!](https://tio.run/##K6gsycjPM/r/PyU1TSFNI08n09ZQ08pQP8@6oCgzr0RJQUmrTjdPW0lZSSvTGiiva6iTqW2k@T9NIzOvoLREQ1PzvykA "Python 2 – Try It Online")
Basically the same solution as [Jonathan Allan](https://codegolf.stackexchange.com/a/199092/20260), but a function that prints and terminates with error, if that's allowed here. The `1/n` is used to halt execution where `n=0`. Maybe there's a way to do that shorter by stuffing in a `/n` or `%n` somewhere.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 8 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
Multiple 8 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage) programs are possible:
* `·ÅÉ'#×.c`: [Try it online](https://tio.run/##yy9OTMpM/f//0PbDrYc71ZUPT9dL/v/fFAA) or [verify all test cases](https://tio.run/##yy9OTMpM/R9yuPVwZ5mSZ15BaYmVgpJ9pQ6Xkn9pCYSnU/n/0HaQAnXlw9P1kv/rHNpm/x8A).
* `L'#×€û.c`: [Try it online](https://tio.run/##yy9OTMpM/f/fR1358PRHTWsO79ZL/v/fFAA) or [verify all test cases](https://tio.run/##yy9OTMpM/R9yuPVwZ5mSZ15BaYmVgpJ9pQ6Xkn9pCYSnU/nfR1358PRHTWsO79ZL/q9zaJv9fwA).
* `L·<'#×.c`: [Try it online](https://tio.run/##yy9OTMpM/f/f59B2G3Xlw9P1kv//NwUA) or [verify all test cases](https://tio.run/##yy9OTMpM/R9yuPVwZ5mSZ15BaYmVgpJ9pQ6Xkn9pCYSnU/nf59B2G3Xlw9P1kv/rHNpm/x8A).
* `'#×ηj€û»`: [Try it online](https://tio.run/##yy9OTMpM/f9fXfnw9HPbsx41rTm8@9Du//9NAQ) or [verify all test cases](https://tio.run/##yy9OTMpM/R9yuPVwZ5mSZ15BaYmVgpJ9pQ6Xkn9pCYSnU@nyX1358PRz27MeNa05vPvQ7v86h7bZ/wcA).
**Explanations:**
```
·         # Double the (implicit) input-integer
          #  i.e. 3 → 6
 ÅÉ       # Pop and push a list of all positive odd values below this doubled value
          #  → [1,3,5]
   '#×   '# Repeat "#" that many times as string
          #  → ["#","###","#####"]
      .c  # Centralize this list (which implicitly joins by newlines)
          #  → "  #\n ###\n#####"
L         # Push a list in the range [1, (implicit) input-integer]
          #  i.e. 3 → [1,2,3]
 '#×     '# Repeat "#" that many times as list
          #  → ["#","##","###"]
    €û    # Palindromize each
          #  → ["#","###","#####"]
      .c  # Centralize this list (which implicitly joins by newlines)
          #  → "  #\n ###\n#####"
L         # Push a list in the range [1, (implicit) input-integer]
          #  i.e. 3 → [1,2,3]
 ·        # Double each value
          #  → [2,4,6]
  <       # Decrease each by 1
          #  → [1,3,5]
   '#×.c '# Same as the first answer above
'#×      '# Repeat "#" the (implicit) input-integer amount of times as string
          #  i.e. 3 → "###"
   η      # Take the prefixes of that string
          #  → ["#","##","###"]
    j     # Pad spaces to each to make the total length equal to the (implicit) input
          #  i.e. 3 → ["  #"," ##","###"]
     €û   # Palindromize each
          #  → ["  #  "," ### ","#####"]
       »  # Join by newlines
          #  → "  #  \n ### \n#####"
```
For each of these programs the resulting string is then output implicitly (with trailing newline).
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~104~~ \$\cdots\$ ~~72~~ 71 bytes
Saved ~~5~~ 11 bytes thanks to [S.S.Anne](https://codegolf.stackexchange.com/users/89298/s-s-anne)!!!  
Saved 6 bytes thanks to [gastropner](https://codegolf.stackexchange.com/users/75886/gastropner)!!!  
Saved a byte thanks to [Stephen](https://codegolf.stackexchange.com/users/65836/stephen)!!!
```
i;j;f(n){for(i=0;i++<n;)for(j=0;j<i*2;)printf(j++?"#":"\n%*s",n-i,"");}
```
[Try it online!](https://tio.run/##JclBCoMwEEDRvacII4UZo2Bb3HSUXsSNBCMT6LREuxLPnhq6eny@axbnUhIO7FFp9@@IMrQs1vbKlDOcGXqpbkyfKLp5DNY@oYQHjHqpVqi1kRqA@EjnNq9JFMnshfF4Jc7c/3SZOG/fqKbl4kg/ "C (gcc) – Try It Online")
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~46~~ 43 bytes
```
f=->g{g.times{|n|puts" "*(g-n)+?#*(2*n+1)}}
```
[Try it online!](https://tio.run/##KypNqvz/P81W1y69Ol2vJDM3tbi6Jq@moLSkWElBSUsjXTdPU9teWUvDSCtP21CztvZ/ml5yYk6OhqnmfwA "Ruby – Try It Online")
* -3 thanks to IMP1
[Answer]
# [J](http://jsoftware.com/), ~~19~~ 18 bytes
```
' #'(#~|.,.1++:)i.
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/1RWU1TWU62r0dPQMtbWtNDP1/mtycaUmZ@QrpCkYQxjq6jAB0/8A "J – Try It Online")
*-1 byte thanks to FrownyFrog*
Let's do 3:
* `i.` Produces:
```
0 1 2
```
* `|.,.1++:` - Reverse `|.` produces `2 1 0` and `1 +` the double `+:` produces `1 3 5`. Then we zip `,.` those together:
```
2 1
1 3
0 5
```
* `' #'#~` copies each character in the 2-character string `#` (space and pound) according to the mask specified above, and pads the end of the first two rows with spaces, so every row is 5 characters:
```
  #  
 ### 
#####
```
[Answer]
# [cQuents](https://github.com/stestoltz/cQuents), 18 bytes
```
|
&@ (n-$)~@#(2$-1
```
[Try it online!](https://tio.run/##Sy4sTc0rKf7/v4ZLzUFBI09XRbPOQVnDSEXX8P9/UwA "cQuents – Try It Online")
## Explanation
```
|
                   terms in sequence are separated by newline
&                  output first n terms in sequence
                   each term is:
 @                 " " *
   (n-$)                 n - index
        ~                          concat
         @#                               "#" *
           (2$-1                                2 * index - 1
```
[Answer]
# APL+WIN, 23 bytes
Prompts for integer:
```
(-⌽⍳n)⌽⊃(1+2×⍳n←⎕)⍴¨'#'
```
[Try it online! Courtesy of Dyalog Classic](https://tio.run/##SyzI0U2pTMzJT9dNzkksLs5M/v@ob6qvz6O2CcZcQJanP5BlwPWooz3tv4buo569j3o352mC6K5mDUNto8PTQQJANUC1mo96txxaoa6s/h@o/H8alzFXGpcpAA "APL (Dyalog Classic) – Try It Online")
[Answer]
# [MATL](https://github.com/lmendo/MATL), 11 bytes
```
:&<~P2&ZvZc
```
[**Try it online!**](https://tio.run/##y00syfn/30rNpi7ASC2qLCr5/39TAA "MATL – Try It Online")
### How it works
Consider input `3` as an example.
```
:      % Implicit input. Range
       % STACK: [1 2 3]
&<     % Pairwise less-than comparison
       % STACK: [0 0 0;
                 1 0 0
                 1 1 0]
~      % Negate, elementwise
       % STACK: [1 1 1;
                 0 1 1;
                 0 0 1]
P      % Flip vertically
       % STACK: [0 0 1;
                 0 1 1;
                 1 1 1]
2&Zv   % Reflect horizontally, without repeating last column
       % STACK: [0 0 1 0 0;
                 0 1 1 1 0;
                 1 1 1 1 1]
Zc     % Replace nonzeros by '#' and zeros by ' '
       % STACK: ['  #  '
                 ' ### ';
                 '#####']
       % Implicit display
```
[Answer]
# [Python 2](https://docs.python.org/2/), 48 bytes
```
n=input();v=1
while n:n-=1;print' '*n+'#'*v;v+=2
```
**[Try it online!](https://tio.run/##K6gsycjPM/r/P882M6@gtERD07rM1pCrPCMzJ1UhzypP19bQuqAoM69EXUFdK09bXVldq8y6TNsWqMMYAA "Python 2 – Try It Online")**
---
A fun **49** with an extra space of padding is:
```
s=' '*input()+'#'
while'#'>s:print s;s=s[1:]+'##'
```
[Try that](https://tio.run/##K6gsycjPM/r/v9hWXUFdKzOvoLREQ1NbXVmdqzwjMycVyLArtiooyswrUSi2LrYtjja0igVKK6v//28MAA "Python 2 – Try It Online")
[Answer]
# [Red](http://www.red-lang.org), ~~78~~ 76 bytes
```
func[n][s: copy"#"repeat i n[print pad/left s n + i - 1 append s"##"take s]]
```
[Try it online!](https://tio.run/##LcsxCoAwDAXQ3VN82lFEHFw8hmvIUGwKosTQ1sHTVwfnx8sS2yqRuEsLWrp1I2UqC7bLHuddFpNQsUPJ8q4VFuJ4SqooUPQfDJgQzEQjivPe1XAICnP7q2KmBOX2Ag "Red – Try It Online")
## Alternative using [Red](http://www.red-lang.org)'s `parse`:
# [Red](http://www.red-lang.org), 77 bytes
```
func[n][s: to""pad/left"#"n loop n[parse s[(print s take s)to"#"insert"##"]]]
```
[Try it online!](https://tio.run/##DcqxCgIxDIDhvU8R0kUnORGRewzXkKHYBA6PtDT1@WuGb/jhH1LXWypx0h2W/uxDxuQ7zIbYS72dohMzGpytdTDqZbiA06WPwyY4zPKNvsaf8TCXEXtGZl4KW1K4h0d4he2Z1h8 "Red – Try It Online")
[Answer]
# [Rule 222](https://www.wolframalpha.com/input/?i=rule+222), 1 byte (noncompeting)
```
#
```
[Wolfram codes](https://en.wikipedia.org/wiki/Wolfram_code) describe a family of celular automata. While most behave in very simple ways, some of them show very complex behaviour. [Rule 110](https://en.wikipedia.org/wiki/Rule_110) is even Turing complete.
Rule 222 is one of the "simple" ones. After n generations, it produces a triangle of n levels, as specified in the challenge. A synonymous cellular automata in this case is Rule 254.
[Answer]
# k4 23 bytes
-6 thanks to streetster!
```
{(-x+!x)$(1+2*!x)#'"#"}
```
29 bytes previous solution+explanation:
```
{(-x+!x)$|:'x#x("##",)\"# "}
{                          } /lambda with implicit arg `x`
              x("##",)\"# "  /function composition - cumulatively join (,) "##" to "# " x times and return intermediate results ("# ";"### ";"##### ") etc
            x#               /take x items
         |:'                 /reverse each
 (-x+!x)                     /enumerate x and subtract x from each (x=3 -> -3+0 1 2)
        $                    /pad, left-pads when left arg is negative
```
[Answer]
# [Python 3](https://docs.python.org/3/), 58 bytes
```
def f(n,i=1):print((n-i)*' '+(2*i-1)*'#');n>i and f(n,i+1)
```
[Try it online!](https://tio.run/##JcoxDoAgDADArzRxoEUYKnHB6F9MkNilEMLi69HE7YarT7@LhjHSlSGjOtmZYm2iHVG9kDVgZlyseP48Gdr0EDg1/XtmGrk0EBAFdsGtMaPQeAE "Python 3 – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 11 bytes
```
>þ`UŒBị⁾ #Y
```
[Try it online!](https://tio.run/##y0rNyan8/9/u8L6E0KOTnB7u7n7UuE9BOfL////GAA "Jelly – Try It Online")
A full program that takes an integer argument and prints a triangle. If a monadic link returning a list of Jelly strings is acceptable, the final byte can be saved for 10 bytes. 
## Explanation
```
>þ`         | Outer table using greater than and 1..n as both left and right argument
   U        | Reverse order of inner lists
    ŒB      | Bounce inner lists (i.e. repeat each one in reversed order without duplicating the final character)
      ị⁾ #  | Index into [" ", "#"]
          Y | Join with newlines
```
[Answer]
# [Burlesque](https://github.com/FMNSSun/Burlesque), 30 bytes
```
2|*J' j|*iSj'#j|*iT2enq\[Z[unQ
```
[Try it online!](https://tio.run/##SyotykktLixN/f/fqEbLS10hq0YrMzhLXRlEhxil5hXGREdFl@YF/v9vCgA "Burlesque – Try It Online")
Not left aligned, but functionally an isosceles triangle. Takes input as `N`.
```
2|*    # N*2
J      # Duplicate this number
' j|*  # 2N spaces
iS     # [2N..1] spaces as list
j      # Swap back
'#j|*  # 2N hashes
iT     # [1..2N] hashes as list
2en    # Take each odd
q\[Z[  # Zip together, and concatenate
un     # Add new lines between each element
Q      # Pretty print
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~75~~ 70 bytes
```
i,m;f(n){m=n*2;for(i=m*n;i--;)putchar(i%m?abs(i%m-n)<n-i/m?35:32:10);}
```
[Try it online!](https://tio.run/##bYtBCoMwEADP5hVFKOyKS1uDF7fiW9JA2j3stlR7Et8ezb2nYQYm0jPGnKVVTmC46mhNx@n9BRm1MRYixs9via9wpLNO4TEXkuHdSC46@X7w3XC7Im9ZbDlpEAN0q6sSeGRXHfcMNRHVxRL0/2L53ZZ3 "C (gcc) – Try It Online")
[Answer]
# [Python 2](https://docs.python.org/2/), 54 bytes
```
n,i=input(),1
exec"print(n-i)*' '+(2*i-1)*'#';i+=1;"*n
```
[Try it online!](https://tio.run/##K6gsycjPM/r/P08n0zYzr6C0RENTx5ArtSI1WamgKDOvRCNPN1NTS11BXVvDSCtT1xDIVla3ztS2NbRW0sr7/98UAA "Python 2 – Try It Online")
Based on [Jitse's Python 3 solution](https://codegolf.stackexchange.com/a/199072/65836).
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-R`](https://codegolf.meta.stackexchange.com/a/14339/), 9 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
õî'# mê û
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LVI&code=9e4nIyBt6iD7&input=NQ)
Or 7 bytes if we can choose which character to use.
```
õ_î¬êÃû
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LVI&code=9V/urOrD%2bw&input=NQ)
[Answer]
# [Haskell](https://www.haskell.org/), 57 bytes
```
r=replicate
f x=unlines[r(x-n)' '++r(2*n-1)'#'|n<-[1..x]]
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/v8i2KLUgJzM5sSSVK02hwrY0LyczL7U4ukijQjdPU11BXVu7SMNIK0/XUFNdWb0mz0Y32lBPryI29n9uYmaegq1CQWlJcEmRT56CikKagul/AA "Haskell – Try It Online")
The `unlines` function is often helpful for ASCII art problems.
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-R`](https://codegolf.meta.stackexchange.com/a/14339/), 9 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
ÇÑÄ ç'#
û
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LVI&code=x9HEIOcnIwr7&input=Mw)
[Answer]
# [MathGolf](https://github.com/maxbergmark/mathgolf/blob/master/math_golf.txt), ~~18~~ 17 [bytes](https://github.com/maxbergmark/mathgolf/blob/master/code_page.py)
```
╒_'#*mñ\x *^my ═n
```
[Try it online.](https://tio.run/##y00syUjPz0n7///R1Enx6spauYc3xlQoaMXlVio8mjoh7/9/Qy5jLlMuQ0MA)
**Explanation:**
```
╒                  # Push a list in the range [1, (implicit) input-integer]
                   #  3 → [1,2,3]
 _                 # Duplicate this list on the stack
  '#*             '# Repeat "#" the values amount of time as string
                   #  → ["#","##","###"]
     mñ            # Palindromize each
                   #  → ["#","###","#####"]
       \           # Swap to get the duplicated [1, input] list at the top again
        x          # Reverse this to [input, 1]
                   #  → [3,2,1]
          *        # Repeat a space the values amount of time as string
                   #  → ["   ","  "," "]
           ^       # Zip the two lists together
                   #  → [["#","   "],["###","  "],["#####"," "]]
            my     # Join each inner pair together
                   #  → ["#   ","###  ","##### "]
               ═   # Pad leading spaces to each string to make them all of equal length
                   #  → ["  #   "," ###  ","##### "]
                n  # And join this list by newlines
                   #  → "  #   \n ###  \n##### "
                   # (after which the entire stack is output implicitly as result)
```
[Answer]
# [Canvas](https://github.com/dzaima/Canvas/wiki), 6 [bytes](https://github.com/dzaima/Canvas/blob/master/main.js)
```
｛#×］±│
```
[Try it online.](https://dzaima.github.io/Canvas/?u=JXVGRjVCJTIzJUQ3JXVGRjNEJUIxJXUyNTAy,i=NQ__,v=2)
**Explanation:**
```
｛        # Map over the range [1, input]:
  #×      #  Repeat "#" the value amount of times
    ］±   # After the map: interpret the array as a 2D string, and reverse it
       │  # And palindromize it horizontally with 1 overlap
          # (after which it is output implicitly as result)
```
[Answer]
# [Icon](https://github.com/gtownsend/icon), 73 bytes
```
procedure f(n,i)
/i&i:=1
write(right(repl("#",i),n+i))
n>1&f(n-1,i+2)
end
```
[Try it online!](https://tio.run/##y0zOz/v/v6AoPzk1pbQoVSFNI08nU5NLP1Mt08rWkKu8KLMkVaMoMz2jRKMotSBHQ0lZCSivk6edqanJlWdnqAbUoGuok6ltpMmVmpeCZFJuYmaehiaXAhCkaZhCZAE "Icon – Try It Online")
[Answer]
# [Stax](https://github.com/tomtheisen/stax/blob/master/docs/instructions.md), 9 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
é─C:UÅ≤┘.
```
My first Stax answer. :)
[Try it online](https://staxlang.xyz/#p=82c4433a558ff3d92e&i=5&a=1) or [try it online unpacked (**10 bytes**)](https://staxlang.xyz/#c=%27%23*%7C%5B%7C%3Em%7Cp&i=5&a=1).
**Explanation (of the unpacked version):**
```
'#*        '# Repeat "#" the (implicit) input-integer amount of times as string
            #  i.e. 3 → "###"
   |[       # Get the prefixes of this string
            #  → ["#","##","###]
     |>     # Padding leading spaces up to a length equal to the longest string
            #  → ["  #"," ##","###"]
       m    # Map over each line:
        |p  #  Palindromize the line
            #   → ["  #  "," ### ","#####"]
       m    # And the map also prints each line with trailing newline afterwards
            #  → "  #  \n"
            #    " ### \n"
            #    "#####\n"
```
[Answer]
# [PHP](https://php.net/), ~~65~~ ~~64~~ 62 bytes
```
for($j=$argn+$i=1;--$j;$i+=2)printf("%{$j}s%'#{$i}s\n",'','');
```
[Try it online!](https://tio.run/##DcQxDoAgDADAv2AJEGTAFYmbr3BxQcsADbAZvi6aXI5uGutG/yEXCdHDWa6kAb11xkB0gNovigqmFiTjD8ReuZgewF6PxGYhfsqNYe2bqWFOdZj9Aw "PHP – Try It Online")
Muuuuch better version with string formatting. I knew there was something, PHP is a templating language after all.. It couldn't be that bad for this kind of job!!
EDIT: saved 1 byte and removed the extra leading space by moving `$i++` to the `printf`
EDIT2: saved 2 bytes with new strategy by @GuillermoPhillips (thanks!)
**ORIGINAL NAIVE ANSWER:**
# [PHP](https://php.net/), 104 bytes
```
for($t='#';$i++<$argn;$s.=' ',$t="#$t#"){$r[$i*2]="$t\n";$r[($argn-$i)*2+1]=$s;}ksort($r);echo join($r);
```
[Try it online!](https://tio.run/##HYpBCsMgFAWvEvSBGpuC2RrJrpdIsyilbWzBL@qu9Oo1ks3AMBO3WKc5Nj4pSRQnuLDwWk@4pVewyGcnOnFqhXEUztQXaYHvx9UxlGtgtrk85gFe9aM2q0O2v0@mVCSSso/7Rt2bfDisVmP@FIunkOtw2QE "PHP – Try It Online")
[Answer]
# Java 8, ~~151~~ 128 bytes
`p->{for(int c=1;p>0;c+=2)System.out.println(new String(new char[p--]).replace('\0',' ')+new String(new char[c]).replace('\0','#'));}`
[TIO](https://tio.run/##bZDBbgIhEIbvPsWf9ABku8Q26QnXN6gXj@qBIlZ0ZQmLNo3ZZ18HtKfKYWDmnzD/Nwd90fVhexxNq/sen9r56wRwPtm408ZikVPg0rktEqc6glBUGiYUFvBoMIZ6ft11saimeVNhPlWmat7F8rdP9iS7c5Ihktp67u0PlomS7/I0ex1Xoa43QkYbWprI2XrKXhmYqJ71mn@dL0wINYwqGwrnr9YZ9EknuorpEyHx@y@rDbS48/zZdWQXbvZBoaoeGpCn5VVwIb0k6kKczxOghzaUnQzjDQ)
See also [JDK 13 answer](https://codegolf.stackexchange.com/a/199117/62289)
[Answer]
# [Haskell](https://www.haskell.org/), 52 bytes
```
f x=do n<-[1..x];'\n':([n..x]>>" ")++([2..2*n]>>"#")
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P02hwjYlXyHPRjfaUE@vItZaPSZP3UojOg/EsbNTUlDS1NbWiDbS0zPSygMJKCtp/s9NzMxTsFUoKC0JLilSUFFIUzD9DwA "Haskell – Try It Online")
[Answer]
# Haskell, ~~91~~ ~~[72](https://tio.run/##DclBCoMwEAXQvaf4RCGGSaUWupwbdOe2UEKJGpoOMo3nT7N78Pbw@8Sca1XWeOT0DiV26/jyV8fGNCUvjhUCC0ukSLB9g3mKIWpNNy@X2XUbr9Po3Vy/IQkYx1mWog/BgA33@gc)~~ 62 bytes
```
(1!)
_!0=""
i!n=r n ' '++r i '#'++'\n':(i+2)!(n-1)
r=replicate
```
*-10 bytes* thanks to @Laikoni.
You can [try it online](https://tio.run/##DczBCgIhEADQu18xbsEostAGXQL/oFvXhRAxG7JBZu33m/b2Tu@VtndpTStEWNUt1puHPcVpMmQ5CjAgYAgCBHjYgSvj1VE4e@t4XryRKKU3ymkU/STi/enfcR9yYzhChYv@8rOluumce/8D)!
]