[Question]
  [
### Inspired by the fact that a few related challenges to this could be answered by Vyxal in 0 Bytes using a special flag combination.
Given only one input integer \$n\$, calculate \$f(n,n)\$ where
$$ f(x,y)=
\begin{cases}
x & \text{if } y=0 \\
f(\left(\sum\_{k=1}^xk\right),\text{ }y-1) & \text{otherwise}
\end{cases}
$$
If you want an explanation in plain English, here it is, quoted from OEIS:
> 
> Let \$T(n)\$ be the \$n\$-th triangular number \$n\*(n+1)/2\$; then \$a(n)\$ = \$n\$-th iteration [of] \$T(T(T(...(n))))\$.
> 
> 
> 
Note that a(n) is the function.
---
This is also [A099129](https://oeis.org/A099129)\$(n)\$, but with the case for \$n=0\$. This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so as long as you make your answer short, it doesn't matter whether it times out on TIO (my computer can't calculate \$n=6\$ within five minutes!). Yes, standard loopholes apply.
---
## Test cases:
```
0 -> 0
1 -> 1
2 -> 6
3 -> 231
4 -> 1186570
5 -> 347357071281165
6 -> 2076895351339769460477611370186681
7 -> 143892868802856286225154411591351342616163027795335641150249224655238508171
```
  
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 3 bytes
```
FLO
```
[Try it online!](https://tio.run/##yy9OTMpM/f/fzcf//38TAA "05AB1E ‚Äì Try It Online")
#### Explanation
```
     # Implicit input
F    # Repeat input number of times:
 L   #  Push the one-range of top of stack
  O  #  Sum the resulting list
     # Implicit output
```
[Answer]
# [Python 2](https://docs.python.org/2/), 35 bytes
```
def f(n):exec"n=n*-~n/2;"*n;print n
```
[Try it online!](https://tio.run/##K6gsycjPM/r/PyU1TSFNI0/TKrUiNVkpzzZPS7cuT9/IWkkrz7qgKDOvRCHvf1p@kUKeQmaeQlFiXnqqhpmmFZcCVE6HC6z7PwA "Python 2 ‚Äì Try It Online")
A function that prints.
# [Python 3](https://docs.python.org/3.8/), 39 bytes
```
lambda n:eval("(n:=n*-~n//2)*0+"*n+"n")
```
[Try it online!](https://tio.run/##BcFBCoAgEAXQq4irGSWKggjBm7QxyhLsKyJBm65u7@W3XgnTkkvzdm3R3dvuBMzxuEiSYCxU96HvR1aDlgpaQnLzqQiIAFEczoNmNrkEVPIE5vYD "Python 3.8 (pre-release) ‚Äì Try It Online")
The annoying thing in Python 3 here is that `exec` within a function is its own scope and doesn't affect variables outside the `exec`, so we can't port the code like `def f(n):exec("n=n*-~n/2;"*n);print(n)` -- the `n` will be unchanged.
The code above works around this by evaluating a string like `(n:=n*-~n//2)*0+(n:=n*-~n//2)*0+n` that modifies `n` using the walrus `:=` and evaluates to `n` within its own scope. If we didn't need `n=0`, we could do:
**37 bytes, fails n=0**
```
lambda n:eval("(n:=n*-~n//2),"*n)[-1]
```
[Try it online!](https://tio.run/##BcFBCoAgEAXQq0irGVGkWhSCJ6kWRllBfUUiaNPV7b303ntE26dcghvL6a958QJ2ffxJFcE6SP3BmIZVJcGDrqcSYhYQB0T22FaqVcc25QM3BQJz@QE "Python 3.8 (pre-release) ‚Äì Try It Online")
Here were some other attempts.
**39 bytes**
```
lambda n:eval('('*n+'n'+'+.5)**2//2'*n)
```
[Try it online!](https://tio.run/##DchBCoAgEAXQq7ibGYUEo4igm7QxygrsKxJBp7fe8uX3PhLaIZcaprlGfy2rVxi3x0cmJg1DIEOm6URrZ637S2pIRUGdUMVj37iXMZcTNweGSP0A "Python 3.8 (pre-release) ‚Äì Try It Online")
Based on @dingledooper's comment.
**40 bytes**
```
def f(n):exec("n*=n/2+.5;"*n+"print(n)")
```
[Try it online!](https://tio.run/##K6gsycjPM7YoKPr/PyU1TSFNI0/TKrUiNVlDKU/LNk/fSFvP1FpJK09bqaAoM68EKKuk@T8tv0ghTyEzT6EoMS89VcNM0wqk7T8A "Python 3.8 (pre-release) ‚Äì Try It Online")
**41 bytes**
```
lambda n:0*[n:=n*-~n//2for _ in[1]*n]or n
```
[Try it online!](https://tio.run/##FchLCoAgFAXQeat4Q5XCPhAhuBKTMMoK6ibSpElbtxqeE@5rPdF0ISav@7S7Y5wcQZXCQGmI4oGUtT8jDbTBVFbAfkD6C19RdFhm1nKVUYgbLoacPAPn6QU "Python 3.8 (pre-release) ‚Äì Try It Online")
[Answer]
# [Python 3](https://docs.python.org/3/), 42 bytes
think i might be able to get it down further... lmk if you guys see anything !!
```
lambda x:eval("sum(range("*x+"x"+"+1))"*x)
```
[Try it online!](https://tio.run/##TctLDoIwEAbgvacws@rYWTAd2hITbuKmRlATqASR1NPXbgwsv/8xfZfHK0ru20sewni9hWM6d2sYFLw/o5pDvHcKTklDAg2aEQswT/MzLqpXFVKFh78YiTcZJLdJkIzs2rpsuXHW7/4WSWovJfNsGmZnMf8A "Python 3 ‚Äì Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 4 bytes
```
RS$¬°
```
[Try it online!](https://tio.run/##y0rNyan8/z8oWOXQwv///5sAAA "Jelly ‚Äì Try It Online")
Full program, takes \$n\$ as the first argument and outputs \$f(n, n)\$
## How it works
```
RS$¬° - Main link. Takes n on the left
  $  - Last two links as a monad f(n):
R    -   Range [1, ..., n]
 S   -   Sum; T(n)
   ¬° - Apply f n times, beginning with n 
```
[Answer]
# [><> (Fish)](https://esolangs.org/wiki/Fish), 23 bytes
```
i::?\~n;
-10.\r:1+*2,r1
```
[Try it](https://mousetail.github.io/Fish/#eyJ0ZXh0IjoiaTo6P1xcfm47XG4tMTAuXFxyOjErKjIscjEiLCJpbnB1dCI6IjQiLCJzdGFjayI6IiIsInN0YWNrX2Zvcm1hdCI6Im51bWJlcnMiLCJpbnB1dF9mb3JtYXQiOiJudW1iZXJzIn0=)
[![enter image description here](https://i.stack.imgur.com/ecr7P.png)](https://i.stack.imgur.com/ecr7P.png)
[Answer]
# [Brainfuck](https://esolangs.org/wiki/Brainfuck), ~~64~~ 48 bytes
```
[>+>+<<-]>[->[[>+>+<<-]>>-[<<+>>-]<<]>[<+>-]<<]>
```
[Try it online!](https://copy.sh/brainfuck/?c=SGVhZGVyOiBnaXZlIE4gaGVyZQorKysrCgpBY3R1YWwgY29kZQpbPis-Kzw8LV0gICAgICAgICAgIyBEdXBsaWNhdGUKPlstICAgICAgICAgICAgICAgICMgUmVwZWF0IGlucHV0IHRpbWVzOgogID5bICAgICAgICAgICAgICAgICAjIFdoaWxlIHggPSBuIGNhbiBiZSBkZWNyZW1lbnRlZAogICAgWz4rPis8PC1dICAgICAgICAgICMgQWNjdW11bGF0ZSByZXN1bHQgYW5kIG1ha2UgY29weQogICAgPj4tWzw8Kz4-LV08PCAgICAgICMgTW92ZSBjb3B5IG1pbnVzIDEgYmFjawogIF0-WzwrPi1dPDwgICAgICAgICAjIE1vdmUgYmFjayBhY2N1bXVsYXRlZCBUKG4pIGFzIG5ldyB4Cl0-Cg$$) (Up to `n = 3` with 8 bit numbers, `n = 4` with 32 bit, `n = 5` with 64 bit, `n = 6` possibly never [with BigInt].)
Rather simple brainfuck answer. Assumes you initialise the tape with the input on cell 0 and stores the output in cell 2. If input given in binary, just wrap the code in `,` and `.` for +2 bytes. If the input should be the number in ASCII this would also involve writing the parser, I feel that is not in the spirit of the challenge.
The input in the first cell (0) is duplicated and then the loop simply iterates on cell 1. Each value of the triangle is added to cell 3 and copied back with 1 removed to cell 2. At the end of the loop that new value is stored in cell 2.
```
Header: give N here
++++
Actual code
[>+>+<<-]          # Duplicate
>[-                # Repeat input times:
  >[                 # While x = n can be decremented
    [>+>+<<-]          # Accumulate result and make copy
    >>-[<<+>>-]<<      # Move copy minus 1 back
  ]>[<+>-]<<         # Move back accumulated T(n) as new x
]>
```
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 6 bytes
```
LsSbyF
```
[Try it online!](https://tio.run/##K6gsyfj/36c4OKnS7f9/EwA "Pyth ‚Äì Try It Online")
### Alternative 6 byte solution
```
usSGQQ
```
[Try it online!](https://tio.run/##K6gsyfj/v7Q42D0w8P9/EwA "Pyth ‚Äì Try It Online")
### Another alternative 6 byte solution
```
.v*"sS
```
[Try it online!](https://tio.run/##K6gsyfj/X69MS6k4@P9/EwA "Pyth ‚Äì Try It Online")
This one's my favorite.
### Another alternative 6 byte solution
```
em=sSQ
```
[Try it online!](https://tio.run/##K6gsyfj/PzXXtjg48P9/EwA "Pyth ‚Äì Try It Online")
Feels like there's gotta be a 5 byte solution but I got nothing
[Answer]
# [Factor](https://factorcode.org/) + `math.unicode`, 26 bytes
```
[ dup [ [1,b] Œ£ ] times ]
```
[Try it online!](https://tio.run/##S0tMLskv@h8a7OnnbqWQnVqUl5qjkJtYkgEm9IoS89JTiyHs0rzM5PyUVIWCotSSksqCosy8EoXi1MLS1LxkoBJrLi4Lhcz8ksT/0QoppQUK0QrRhjpJsQrnFivEKpRk5gKVxP7PTSxQKC5JTM7W@w8A "Factor ‚Äì Try It Online")
Literally just take the sum of the range of the input <input> number of times. Since `sum` dispatches on `range`s to use the arithmetic formula, it's even efficient.
[Answer]
# [Thunno 2](https://github.com/Thunno/Thunno2), 3 bytes
```
{RS
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m728JKM0Ly_faMGCpaUlaboWi6uDgpcUJyUXQ_kLFppCGAA)
#### Explanation
```
{RS  # Implicit input
{    # Repeat input number of times:
 R   #  One-range of top of stack (initially the input number)
  S  #  Sum the resulting list and leave it for the next iteration
     # Implicit output 
```
[Answer]
# [R‚â•4.1](https://www.r-project.org), 33 bytes
```
\(x){Map(\(i)x<<-sum(0:x),1:x);x}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72waMGiNNulpSVpuhY3FWM0KjSrfRMLNGI0MjUrbGx0i0tzNQysKjR1DIGEdUUtROHa4sSCgpxKoIypTpomRGzBAggNAA)
R afficionados should wince when they see `Map` used for it's out-of-scope side-effect due to `<<-` assignment, and the result discarded...
# [R<4.1](https://www.r-project.org), 42 bytes
```
f=function(x,y=x)`if`(y,f(sum(1:x),y-1),x)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72waMGCpaUlaboWN7XSbNNK85JLMvPzNCp0Km0rNBMy0xI0KnXSNIpLczUMrSo0dSp1DTV1KjQhOtYWJxYU5FRqGFiZ6qRBxWCmAQA)
Without the short `\` form, it's too expensive to define two `function`s.
[Answer]
# [Ruby](https://www.ruby-lang.org/), 34 bytes
```
f=->x,y=x{y<1?x:f[(1..x).sum,y-1]}
```
[Try it online!](https://tio.run/##KypNqvz/P81W165Cp9K2orrSxtC@wiotWsNQT69CU6@4NFenUtcwtvZ/gUJatEEsF4gyjv0PAA "Ruby ‚Äì Try It Online")
[Answer]
# [Python 3](https://docs.python.org/3/), ~~63~~ 62 bytes
```
f=lambda x,y=-1:f(x,x)if y<0else x if y<1else f(x*(x+1)/2,y-1)
```
[Try it online!](https://tio.run/##TcxBDoIwEIXhPafoDqoldloKxNjDVCyRBJEwmLSnryMLYfn9bzJzXJ/vSafU29G97g/Hgoi2hGtfBBH40LN4k35EzwLbABtoPRXhDPyiRCyBJ4fol5W65NbK7E8gwk5FrHdqotKHvfqdQ1ub5vDDUNRVoyk2oFqA2mTzMkxrkeOn6zxiztMX "Python 3 ‚Äì Try It Online")
Calculates a(n) using the OEIS definition given in the OP, probably still golfable
Edit: fixed inputs and added "f="
[Answer]
# [BQN](https://mlochbaum.github.io/BQN/), ~~9~~ 6 bytes
*Edit: -3 bytes thanks to ovs*
```
+¬¥‚üú‚Üï‚çü‚ä£
```
[Try it at BQN REPL](https://mlochbaum.github.io/BQN/try.html#code=RiDihpAgK8K04p+c4oaV4o2f4oqjCgpGwqggMOKAvzHigL8y4oC/M+KAvzTigL81)
```
+¬¥‚üú‚Üï‚çü‚ä£
     ‚çü  # Repeat
      ‚ä£ # number of times equal to argument
+¬¥‚üú‚Üï    # this function:
    ‚Üï   #   range 0..(arg-1)
  ‚üú     #   as left arg to 
+¬¥      #   fold-addition
        #   with starting value of function arg
        #   (so: sum of 0..arg)
```
[Answer]
# [J](https://www.jsoftware.com), ~~11~~ 10 bytes
```
(-:*>:)^:]
```
Requires extended precision integer as input. -1 thanks to @Bubbler.
[Attempt This Online!](https://ato.pxeger.com/run?1=m70wa8FOJT31NAVbKwV1BR0FAwUrINbVU3AO8nFbWlqSpmuxSkPXSsvOSjPOKhYisEmTKzU5I19BR08hTc1OIVPPogIisWABhAYA)
```
(-:*>:)^:]¬≠‚Å°‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å§‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å£‚Å°‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å¢‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å£‚Å¢‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å£‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å°‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å¢‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å§‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å£‚Å™‚Äè‚Å†‚Å™‚Å™‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å¢‚Å°‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å§‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå¬≠
       ^:   NB. ‚Äé‚Å°repeat
         ]  NB. ‚Äé‚Å¢y times
    >:      NB. ‚Äé‚Å£increment
 -:         NB. ‚Äé‚Å§halve
   *        NB. ‚Äé‚Å¢‚Å°multiply
```
# [J](https://www.jsoftware.com), ~~12~~ 11 bytes
```
(-:*>:)^:x:
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m70wa8FOJT31NAVbKwV1BR0FAwUrINbVU3AO8nFbWlqSpmuxWkPXSsvOSjPOqsIKIrJJkys1OSNfQUdPIU3NTiFTz6ICIrFgAYQGAA)
```
(-:*>:)^:]¬≠‚Å°‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å§‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å£‚Å°‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å¢‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å£‚Å¢‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å£‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å°‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å¢‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å§‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å£‚Å™‚Äè‚Å†‚Å™‚Å™‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å¢‚Å°‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å§‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå¬≠
       ^:    NB. ‚Äé‚Å°repeat
         x:  NB. ‚Äé‚Å¢y times but promote to extended precision
    >:       NB. ‚Äé‚Å£increment
 -:          NB. ‚Äé‚Å§halve
   *         NB. ‚Äé‚Å¢‚Å°multiply
```
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 29 bytes
```
f=(x,y=x)=>y?f(x*++x/2,y-1):x
```
[Try it online!](https://tio.run/##DcRLDkAwEADQvVNYzmh9lyhnkWplRIyUyPT05S3evrzLbQNdT3ny6lLyBkRHI2imOHuQQimpOx3LFntJQ@Y5AJlmyGns/pUitHzefLjq4A1IeyDE9AE "JavaScript (Node.js) ‚Äì Try It Online")
[Answer]
# [Husk](https://github.com/barbuz/Husk), 5 bytes
```
!‚Üí¬π¬°Œ£
```
[Try it online!](https://tio.run/##yygtzv6f@6ip8WiDocF/xUdtkw7tPLTw3OL//wE "Husk ‚Äì Try It Online")
[Answer]
# [Racket](https://racket-lang.org) ‚Äì 52 bytes
```
(define(f x y)(if(= y 0)x(f(/(*(+ x 1)x)2)(- y 1))))
```
[Try it online!](https://tio.run/##nY7BbsIwEETv@YoRqOqagki4VCLiA3rqhRtCwpB1a9VZI9spyYVfT522h567h5F23mg0QV8@OI1zp@UN4eehho0VJoMegyJraIcBperJ0JoW9JT9SvVqo2iVQaXyjWR8WDsbE@ggICurkCsZm7JUR1UA1Nh4dXpwmeZsqxNmB9niro/YZcX9YYaJZZGpsihq7D26yNi/vD5GWLl2Ccaya5AbcJLTEhfftiwJ6Z2hz/6TkW4eLu@Py8kUdPI3801wZudv26Imx7@DA@tmGlr/Y@lYPX8B "Racket ‚Äì Try It Online")
## Explanation
We `define` a function `f` that receives two arguments: `x` and `y` where `y` is used as decrementing iterator that when equal to zero will make `f` return the result of `x`.
```
(define (f x y)
  (if (= y 0)
      x
      (f (/ (* (+ x 1) x) 2)
         (- y 1))))
```
We can represent this function mathematically using the following:
$$
f(x, y) =
\begin{cases}
x & y = 0 \\
f(\frac{x(x+1)}{1}, y - 1) & y > 0
\end{cases}
$$
## Sub-optimal variations
To allow user input I could've done:
```
(let([n(read)])(let f([x n][y n])(if(= y 0)x(f(/(*(+ x 1)x)2)(- y 1)))))
```
Which consists of 72 bytes when minified.
We could also have used a combination of a lambda and `let` statement to save one byte:
```
((Œª(n)(let f([x n][y n])(if(= y 0)x(f(/(*(+ x 1)x)2)(- y 1)))))(read))
```
(The `Œª` character equals two bytes.)
## Conclusion
Have an amazing day! I am still mind blown at Racket's speed and capability of handling large numbers. At \$n = 17\$, TIO can't seem to render all the digits alongside all iterations of the `for` loop in the footer.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 13 bytes
```
ÔºÆŒ∏Ôº¶Œ∏‚âîŒ£‚Ä¶¬∑¬πŒ∏Œ∏Ôº©Œ∏
```
[Try it online!](https://tio.run/##S85ILErOT8z5/98zr6C0xK80Nym1SKNQ05orLb9IAchQcCwuzkzP0wguzdXwzEvOKS3OLEsNSsxLT9Uw1FEo1NQEEdZcAUWZeSUazonFJUA9mtb//xv/1y3LAQA "Charcoal ‚Äì Try It Online") Link is to verbose version of code. Explanation:
```
ÔºÆŒ∏
```
Input `n`.
```
Ôº¶Œ∏
```
Repeat `n` times...
```
‚âîŒ£‚Ä¶¬∑¬πŒ∏Œ∏
```
... replace the current value the sum of its range.
```
Ôº©Œ∏
```
Output the final value.
14 bytes for an efficient version:
```
ÔºÆŒ∏Ôº¶Œ∏‚âî√∑√ó‚äïŒ∏Œ∏¬≤Œ∏Ôº©Œ∏
```
[Try it online!](https://tio.run/##S85ILErOT8z5/98zr6C0xK80Nym1SKNQ05orLb9IAchQcCwuzkzP0/DMK3HJLMtMSdUIycxNLQbyk4tSc1PzSlJTgKp0FEDYCExbcwUUZeaVaDgnFpcApTSt//83@69blgMA "Charcoal ‚Äì Try It Online") Link is to verbose version of code. Explanation: Uses the triangle formula to sum the range.
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal) `R`, 14 [bitsv2](https://github.com/Vyxal/Vyncode/blob/main/README.md), 1.75 bytes
```
(‚àë
```
[Try it Online!](https://vyxal.pythonanywhere.com/?v=2#WyJSPSIsIiIsIijiiJEiLCIiLCI0Il0=)
Yeah...
```
(   # Input number of times:
 ‚àë  #  Sum top of stack
    #  (R flag makes it take the range instead of the digits)
```
[Answer]
# [J-uby](https://github.com/cyoce/J-uby), 23 bytes
```
~(:-&(:**&(:+|:sum))).D
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m700K740qXLBIjfbpaUlaboW2-s0rHTVNKy0tICEdo1VcWmupqamngtE9qZSgYJbtGEsF4gyglDGEMoEQpnGQlQuWAChAQ)
## Explanation
With some whitespace:
```
~(:- & (:** & (:+ | :sum))).D
```
The core function here is `:** & (:+ | :sum)`, where `:+` constructs a range and `:sum` sums it, and `:**` applies that function to its own result `n` times. That does what we want‚Äîbut only if we call it like `F.(n).(n)`. In order to be able to call it like `F.(n)`, we use `:-` to turn it into `F.(n, n)`, `D` to force `F` to be treated as a dyad, and then `~` to repeat the given argument the necessary number of times (which is two, thanks to `D`).
[Answer]
# [MATL](https://github.com/lmendo/MATL), 5 bytes
```
t:":s
```
[Try it online!](https://tio.run/##y00syfn/v8RKyar4/38TAA "MATL ‚Äì Try It Online")
### How it works
```
t      % Input (implicit). Duplicate
:      % Range
"      % For each
  :    %   Range
  s    %   Sum
       % End (implicit). Display (implicit)
```
[Answer]
# [Nekomata](https://github.com/AlephAlpha/Nekomata), 4 bytes
```
·µë{R‚àë
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m70iLzU7PzexJHFZtJJurlLsgqWlJWm6Fisebp1YHfSoY-KS4qTkYqjggpUGXIZcRlzGXCYQAQA)
```
·µë{R‚àë
·µë{      Repeat
  R     Range
   ‚àë    Sum
```
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 20 bytes
```
Nest[#(#+1)/2&,#,#]&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2b73y@1uCRaWUNZ21BT30hNR1lHOVbtf0BRZl5JtFKeQppGnqZSLJdbflF0nq2BTp6NrRGQ1NbWgajI01FSUNJRSIvOi42N/Q8A "Wolfram Language (Mathematica) ‚Äì Try It Online")
This code simply nests the short-hand expression for the triangular numbers the given number of times. The computation time starts to become noticeable around `n=20` and my laptop takes around 50 seconds to compute `n=27`, which is a number that takes 63.5 MB to store.
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 8 bytes
```
;?{‚ü¶+}‚Å±‚Åæ
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r/39q@@tH8Zdq1jxo3Pmrc9/@/yf8oAA "Brachylog ‚Äì Try It Online")
### Explanation
```
;?{  }‚Å±‚Åæ         Iterate <Input> times on the Input:
   ‚ü¶               Range
    +              Sum
```
[Answer]
# Haskell, 29 bytes
```
(!!)=<<iterate(\x->sum[0..x])
```
Expands to
```
\n -> iterate (\x -> sum [0..x]) n !! n
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P03BVkFDUVHT1sYmsyS1KLEkVSOmQteuuDQ32kBPryJWkys3MTMPqKigKDOvREFFITexQCFNASRpEvv/PwA "Haskell ‚Äì Try It Online")
[Answer]
# x86-64 machine code, 17 bytes
Standard System V ABI, signature `long fsor(int n)` (`n` is taken in `edi`, and the output is placed in `rax`).
```
57 58 50 5e ff c6 48 f7 e6 48 d1 e8 ff cf 7f f2 c3
```
[Try it online!](https://tio.run/##pVTJbtswEL3zKwYuAtiwJSWO4QJ2klOvRQ899FAXBiWOJCYUqXLxgqLf7g7pJU57CVAfBHLmcd6bzSV37QGr1sDg8L2U3sF89oOxJXwNHZgaLNcNQp7nZGq9792iKCojsDGqzp3n1QvuqjaC8sp0xc@AzkujXTGdT@ezj4ULXWbqjGcp0PH4H7aoTHPXgTPJmMdzZs43A1mNqp7PGHNYRSGQe9x5BvRrlCm5gprAMYwyukmXodQe9IhMlI8W3Apwe7cBXkqySd0Hv4CEoS/YAkW0m@CTI4Wx6ILyyc13LAZdJEoSC97EN2SOhj64FiwFSBfTJ/wJ2nEdSJ8yZC6x4sEhxIa41liPNgZ6QeyhMkHHe2SjSOt15Fur/pXyEfRQj@9GxRQooRQx@S4AyoZUOXml6SwwaiLHGTq@ewtewhYpXR@sBh5d89naT6gdJ0qgkgftZKNRONhKpcBs0NbKbEnLfsv3IOuLDmHQgTYeaumPPBzup0BzCH7f4wQ65FpSgYnU8Q2Su9x7hBYtQnDRgxdhUjuPXKSpdTJPVqmrhDgzHjUeMzplvKSJT4xdUDEP33Jib/HUYZCOyrxbEPyaAcl0bmp8aP8modq/oXGtjecJ3J1xAiuLHdJg0URdGgUl7RSEnspE8xjr9wS36QXhIzKdnxu49P21tdSXwwCernaDseNusw9UCRUEwoPzQpq8fWKsKKCpqrhKNq/gaofiPlnIvnFiz77cU5AdDZz@Z2WWjMVDx6UebowUI/iVdNTGQoLIx1vqy8OcPuPxKPnSkFly1sPVIMW6oXePcKPEaqVXgwnIyYljFAlOecV5u12y3@yYHwlm7F1/BO/LMC@igZnyWYSuh@wTZJ9JI6rXR4c/)
## Explanation
```
0000000000000000 <fsor>:
   0:   57                      push   rdi           ; cnt (edi)
   1:   58                      pop    rax           ; n = cnt
                                                     ;
0000000000000002 <__fsor_lp>:                        ; start_loop:
   2:   50                      push   rax           ;
   3:   5e                      pop    rsi           ; n1 = n
   4:   ff c6                   inc    esi           ; n1++
   6:   48 f7 e6                mul    rsi           ; n *= n1
   9:   48 d1 e8                shr    rax,1         ; n >>= 1
   c:   ff cf                   dec    edi           ; cnt--
   e:   7f f2                   jg     2 <__fsor_lp> ; if (cnt > 0) goto start_loop
  10:   c3                      ret                  ; return
```
[Answer]
# Dyalog APL, 10 bytes
```
{+/‚ç§‚ç≥‚ç£‚çµ‚ä¢‚çµ}
```
## Explanation
```
   ‚ç§        ‚çù ‚Äé‚Å°Function composition:
 +/         ‚çù ‚Äé‚Å¢  sum reduce
    ‚ç≥       ‚çù ‚Äé‚Å£  the numbers from 1 to the argument of the composed function
     ‚ç£‚çµ     ‚çù ‚Äé‚Å§repeated input times
       ‚ä¢‚çµ   ‚çù ‚Äé‚Å¢‚Å°starting from the input
üíé Created with the help of Luminespire at https://vyxal.github.io/Luminespire
```
[Answer]
# [Raku](https://github.com/nxadm/rakudo-pkg), 25 bytes
```
{($_,{.++*$_/2}...*)[$_]}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJZm@79aQyVep1pPW1tLJV7fqFZPT09LM1olPrb2vzVXcWKlQhpQXlMhLb9IIc7QwPo/AA "Perl 6 ‚Äì Try It Online")
[Answer]
# [Julia 1.0](http://julialang.org/), ~~33~~ 26 bytes
```
~x=(1:x.|>_->x*=(x+1)/2;x)
```
[Try it online!](https://tio.run/##yyrNyUw0rPj/v67CVsPQqkKvxi5e165Cy1ajQttQU9/IukLzf7RCQVFmXklOnoaSikZOQWKKRp6OiaamlYKKRl2eppKmQlp@kUKeQmaegqGVaex/AA "Julia 1.0 ‚Äì Try It Online")
-7 bytes thanks to MarcMush: replace `for` loop with pipe operator `|>`
## Alternate approach, ~~39~~ 35 bytes
```
~x=x|>‚àò(fill(n->n*(n+1)√∑2,x)...)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m700qzQnM3HBgqWlJWm6FjeV6ypsK2rsHnXM0EjLzMnRyNO1y9PSyNM21Dy83UinQlNPT08TqlQ_WqGgKDOvJCdPQ0lFI6cgMUUjT8dEU9NKQUWjLk9TSVMhLb9IIU8hM0_B0MpUIRaiDWYTAA)
-4 bytes thanks to MarcMush: remove call to `reduce`
[Answer]
# [Alice](https://github.com/m-ender/alice), ~~24~~ 20 bytes
```
/O
\I@/.!wrd&+?t.!$K
```
[Try it online!](https://tio.run/##S8zJTE79/1/fnyvG00FfT7G8KEVN275ET1HF@/9/k/8A "Alice ‚Äì Try It Online")
Times out for larger values as it creates a range from 0 to the sum of the last range.
## [Alice](https://github.com/m-ender/alice), 21 bytes
```
/O
\I@/.!w.h*2:?t.!$K
```
[Try it online!](https://tio.run/##S8zJTE79/1/fnyvG00FfT7FcL0PLyMq@RE9Rxfv/f7P/AA "Alice ‚Äì Try It Online")
Does not time out as it uses the `n*(n+1)/2` formula instead
]