# Challenge

Given a positive integer $n$, output the $n$-dimensional pyramidal list.

# Example

$n = 1$: Objects arranged in a 1D pyramid (line) with side length 1 is just by itself.

So, the output is {1}.

$n = 2$: Objects arranged in a 2D pyramid (a triangle) with side length 2 would have one on the first row (cyan), and two on the second row (magenta).

Note, the first row is a 1D pyramid with side length 1 ({1}), and the second row is a 1D pyramid with side length 2 ({1, 1}).

So, the output is {{1}, {1, 1}}.

$n = 3$: Objects arranged in a 3D pyramid with side length 3 would have 3 layers:

• The first layer (cyan) is a 2D pyramid with side length 1. It has one row, which has one object. ({{1}})
• The second layer (magenta) is a 2D pyramid with side length 2; It has two rows: the first row with one object and the second row with two objects. ({{1}, {1, 1}})
• The third layer (yellow) is a 2D pyramid with side length 3; it has three rows: the first row with one object, second with two, and third with three. ({{1}, {1, 1}, {1, 1, 1}})

So, the output is {{{1}}, {{1}, {1, 1}}, {{1}, {1, 1}, {1, 1, 1}}}.

$n = k$

This is a $k$ dimensional pyramid with side length $k$. Each "layer" would be a $k-1$ dimensional pyramid, whose side length is its index (1-indexed).

## Sample Outputs

n  output

1  {1}

2  {{1},
{1, 1}}

3  {{{1}},
{{1}, {1, 1}},
{{1}, {1, 1}, {1, 1, 1}}}

4  {{{{1}}},
{{{1}}, {{1}, {1, 1}}},
{{{1}}, {{1}, {1, 1}}, {{1}, {1, 1}, {1, 1, 1}}},
{{{1}}, {{1}, {1, 1}}, {{1}, {1, 1}, {1, 1, 1}},
{{1}, {1, 1}, {1, 1, 1}, {1, 1, 1, 1}}}}


## Rules

• No standard loopholes as always.
• The innermost values of your list may be anything (does not need to be consistent for all elements), as long as they are not lists.

This is , so shortest submissions in each language win!

Note: Graphics generated using Mathematica

• I hammered this as a dupe since the only difference from the other challenge is that $a=b$. However, I upvoted this, since it was pretty hard to find the dupe and only managed to do so when I tried solving it, and this is a good challenge otherwise. – Erik the Outgolfer Aug 5 '18 at 0:12
• @EriktheOutgolfer you're right. Huh, I left this post in the Sandbox for 10 days in case this would happen. :( – JungHwan Min Aug 5 '18 at 0:14

Nest[Range,#,#]&

• When you have time, could you explain how this works? (the Listable attribute plays a key role here, and this feature is not common in other languages) – JungHwan Min Aug 5 '18 at 0:09