[Question]
  [
I'm honestly surprised that this hasn't been done already. If you can find an existing thread, by all means mark this as a duplicate or let me know.
# Input
Your input is in the form of any positive integer greater than or equal to 1.
# Output
You must output the sum of all integers between and including 1 and the number input.
# Example
```
 In: 5
     1+2+3+4+5 = 15
Out: 15
```
[OEIS A000217 — Triangular numbers: a(n) = binomial(n+1,2) = n(n+1)/2 = 0 + 1 + 2 + ... + n.](http://oeis.org/A000217)
# Leaderboard
Run the code snippet below to view a leaderboard for this question's answers. (Thanks to programmer5000 and steenbergh for suggesting this, and Martin Ender for creating it.)
```
var QUESTION_ID=133109,OVERRIDE_USER=69148;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="<h1>"+e.body.replace(OVERRIDE_REG,"")+"</h1>")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/<a/.test(o)&&(o=jQuery(o).text()),s[o]=s[o]||{lang:e.language,user:e.user,size:e.size,link:e.link}});var t=[];for(var o in s)s.hasOwnProperty(o)&&t.push(s[o]);t.sort(function(e,s){return e.lang>s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
```
```
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px} /* font fix */ body {font-family: Arial,"Helvetica Neue",Helvetica,sans-serif;} /* #language-list x-pos fix */ #answer-list {margin-right: 200px;}
```
```
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"> <div id="answer-list"> <h2>Leaderboard</h2> <table class="answer-list"> <thead> <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr></thead> <tbody id="answers"> </tbody> </table> </div><div id="language-list"> <h2>Winners by Language</h2> <table class="language-list"> <thead> <tr><td>Language</td><td>User</td><td>Score</td></tr></thead> <tbody id="languages"> </tbody> </table> </div><table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table>
```
  
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 2 bytes
```
sS
```
[Try it online!](https://pyth.herokuapp.com/?code=sS&input=5&debug=0&input_size=4) Implicit input. `S` is 1-indexed range, and `s` is the sum.
[Answer]
# [Husk](https://github.com/barbuz/Husk), 1 byte
```
Σ
```
[Try it online!](https://tio.run/##yygtzv7//9zi////mwIA "Husk – Try It Online")
Builtin! `Σ` in Husk is usually used to get the sum of all elements of a list, but when applied to a number it returns exactly `n*(n+1)/2`.
[Answer]
# [Piet](http://www.dangermouse.net/esoteric/piet.html), 161 bytes / 16 codels
You can interpret it with [this](http://www.majcher.com/code/piet/Piet-Interpreter.html) Piet interpreter or upload the image on [this](http://www.rapapaing.com/blog/?page_id=6) website and run it there. Not sure about the byte count, if I could encode it differently to reduce size.
Scaled up version of the source image:
[![rapapaing-image](https://i.stack.imgur.com/ZqYz3.png)](https://i.stack.imgur.com/ZqYz3.png)
### Explanation
The `highlighted` text shows the current stack (growing from left to right), assuming the user input is `5`:
[![1st transition](https://i.stack.imgur.com/QPZJW.png)](https://i.stack.imgur.com/QPZJW.png) Input a number and push it onto stack
```
5
```
[![2nd transition](https://i.stack.imgur.com/phnaY.png)](https://i.stack.imgur.com/phnaY.png) Duplicate this number on the stack
```
5 5
```
[![3rd transition](https://i.stack.imgur.com/w8sLj.png)](https://i.stack.imgur.com/w8sLj.png) Push 1 (the size of the dark red area) onto stack
```
5 5 1
```
[![4th transition](https://i.stack.imgur.com/1NnS1.png)](https://i.stack.imgur.com/1NnS1.png) Add the top two numbers
```
5 6
```
[![5th transition](https://i.stack.imgur.com/qCTak.png)](https://i.stack.imgur.com/qCTak.png) Multiply the top two numbers
```
30
```
[![6th transition](https://i.stack.imgur.com/YzxG2.png)](https://i.stack.imgur.com/YzxG2.png) The black area makes sure, that the cursor moves down right to the light green codel. That transition pushes 2 (the size of dark green) onto stack
```
30 2
```
[![7th transition](https://i.stack.imgur.com/lzDKY.png)](https://i.stack.imgur.com/lzDKY.png) Divide the second number on the stack by the first one
```
15
```
[![8th transition](https://i.stack.imgur.com/8B92k.png)](https://i.stack.imgur.com/8B92k.png) Pop and output the top number (interpreted as number)
```
[empty]
```
[![final trap](https://i.stack.imgur.com/0szWJ.png)](https://i.stack.imgur.com/0szWJ.png) By inserting a white area, the transition is a `nop`, the black traps our cursor. This ends execution of the program.
> 
> Original file (far too small for here): [![Original source image](https://i.stack.imgur.com/tj5kQ.png)](https://i.stack.imgur.com/tj5kQ.png)
> 
> 
> 
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), 16 bytes
```
({({}[()])()}{})
```
[Try it online!](https://tio.run/##SypKzMzTTctJzP7/X6Nao7o2WkMzVlNDs7a6VvP/f1MA "Brain-Flak – Try It Online")
This is one of the few things that brain-flak is *really* good at.
Since this is one of the simplest things you can do in brain-flak and it has a lot of visibility, here's a **detailed** explanation:
```
# Push the sum of all of this code. In brain-flak, every snippet also returns a
# value, and all values inside the same brackets are summed
(
    # Loop and accumulate. Initially, this snippet return 0, but each time the
    # loop runs, the value of the code inside the loop is added to the result.
    {
        # Push (and also return)...
        (
            # The value on top of the stack
            {}
            # Plus the negative of...
            [
                # 1
                ()
            ]
        # The previous code pushes n-1 on to the stack and returns the value n-1
        )
        # 1
        # This code has no side effect, it just returns the value 1 each loop.
        # This effectively adds 1 to the accumulator
        ()
    # The loop will end once the value on top of the stack is 0
    }
    # Pop the zero off, which will also add 0 to the current value
    {}
# After the sum is pushed, the entire stack (which only contains the sum)
# will be implicitly printed.
)
```
[Answer]
# [Oasis](https://github.com/Adriandmen/Oasis), 3 bytes
```
n+0
```
[Try it online!](https://tio.run/##y08sziz@/z9P2@D///@mAA "Oasis – Try It Online")
## How it works
```
n+0
  0    a(0)=0
n+     a(n)=n+a(n-1)
```
[Answer]
## JavaScript (ES6), 10 bytes
```
n=>n*++n/2
```
### Example
```
let f =
n=>n*++n/2
console.log(f(5))
```
[Answer]
# Mathematica, 9 bytes
```
#(#+1)/2&
```
# Mathematica, 10 bytes
```
(#^2+#)/2&
```
# Mathematica, 11 bytes
```
Tr@Range@#&
```
# Mathematica, 12 bytes
```
i~Sum~{i,#}&
```
# Mathematica, 14 bytes
(by @user71546) 
```
1/2/Beta[#,2]&
```
# Mathematica, 15 bytes
```
Tr[#&~Array~#]&
```
# Mathematica, 16 bytes
```
Binomial[#+1,2]&
```
# Mathematica, 17 bytes
(by @Not a tree) 
```
⌊(2#+1)^2/8⌋&
```
# Mathematica, 18 bytes
```
PolygonalNumber@#&
```
# Mathematica, 19 bytes
```
#+#2&~Fold~Range@#&
```
# Mathematica, 20 bytes
(by @Not a tree)
```
f@0=0;f@i_:=i+f[i-1]
```
[Answer]
# [Python 2](https://docs.python.org/2/), ~~24~~ 16 bytes
*-8 bytes thanks to FryAmTheEggman.*
```
lambda n:n*-~n/2
```
[Try it online!](https://tio.run/##K6gsycjPM/qfZhvzPycxNyklUSHPKk9Lty5P3@h/QVFmXolCmoap5n8A "Python 2 – Try It Online")
[Answer]
# x86\_64 machine language (Linux), ~~9~~ 8 bytes
```
0:   8d 47 01                lea    0x1(%rdi),%eax
3:   f7 ef                   imul   %edi
5:   d1 e8                   shr    %eax
7:   c3                      retq 
```
To [Try it online!](https://tio.run/##FYrBCoJAFEX3fsXFEN5Li6QgQe1HmhYy4@SDGkMNBsJvn8bVuZx79OGpddiJ06@v6Zt5MTIeh1vQo5sX6KGbYO@PNlW@MspfrsqfSuVtZG@VN3H3lfL6nNZB3IJ3J474lwB2nAibErQoa0jTlqeIPAdjC4DPFH9LSDODzCiXFpACRNHSnonZMgmD61ivyZqEPw "C (gcc) – Try It Online") compile and run the following C program.
```
#include<stdio.h>
const char f[]="\x8d\x47\x01\xf7\xef\xd1\xe8\xc3";
int main(){
  for( int i = 1; i<=10; i++ ) {
    printf( "%d %d\n", i, ((int(*)())f)(i) );
  }
}
```
Thanks to [@CodyGray](https://codegolf.stackexchange.com/questions/133109/sum-of-all-integers-from-1-to-n/133252#133252) and [@Peter](https://codegolf.stackexchange.com/users/30206/peter-cordes) for -1.
[Answer]
# [C# (.NET Core)](https://www.microsoft.com/net/core/platform), 10 bytes
```
n=>n++*n/2
```
[Try it online!](https://tio.run/##Sy7WTc4vSv2fnJNYXKyQX81VXJJYkpmsUJafmaLgm5iZp6FZzaWgEFxZXJKaq@dWmpdsk5lXogPEdgpptv/zbO3ytLW18vSN/lsjlDnn5xXn56TqhRdllqT6ZOalaqRpmGpqElBhaEBYCdiU2tr/AA "C# (.NET Core) – Try It Online")
[Answer]
# [Java (OpenJDK 8)](http://openjdk.java.net/), 10 bytes
```
n->n++*n/2
```
[Try it online!](https://tio.run/##LYw9C8IwFEX3/oo3tpZGEJxEwdFBHIqTODz7RWr6EpKXQpD@9hiL04V7zz0jzlhp09HYvqPxLyUbaBQ6B1eUBJ8M4N86Rk4xa9nClLa8ZitpeDwB7eCKFQUYk094lkr0nhqWmsSF@E5ow810Fllb6OEYqTpRWW5ou4uH9VgHx90ktGdhkpcV5b1AY1Q4u2TI90XxA5dsiV8 "Java (OpenJDK 8) – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 2 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
RS
```
[Try it online!](https://tio.run/##y0rNyan8/z8o@P///6YA "Jelly – Try It Online")
## Explanation
```
RS
    implicit input
 S  sum of the...
R   inclusive range [1..input]
    implicit output
```
## Gauss sum, 3 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
‘×H
```
### Explanation
```
‘×H
     implicit input
  H  half of the quantity of...
‘    input + 1...
 ×   times input
     implicit output
```
[Answer]
# [Octave](https://www.gnu.org/software/octave/), ~~22~~ 19 bytes
*Because arithmetic operations are boring...*
```
@(n)nnz(triu(e(n)))
```
[Try it online!](https://tio.run/##y08uSSxL/Z@mYKugp6f330EjTzMvr0qjpCizVCMVyNHU/J@mYajJlaZhBCJMNf8DAA "Octave – Try It Online")
### Explanation
Given `n`, this creates an `n`×`n` matrix with all entries equal to the number *e*; makes entries below the diagonal zero; and outputs the number of nonzero values.
[Answer]
# [Haskell](https://www.haskell.org/), 13 bytes
This is the shortest (I ~~think~~thought):
```
f n=sum[1..n]
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P00hz7a4NDfaUE8vL/Z/bmJmnoKtQm5igW@8gkZBUWZeiV6apgJI1tAg9j8A "Haskell – Try It Online")
### Direct, ~~17~~ 13 bytes
```
f n=n*(n+1)/2
```
Thanks @WheatWizard for `-4` bytes!
[Try it online!](https://tio.run/##y0gszk7Nyfn/P00hz1YjT9tQUytP3@h/bmJmnoKtQm5igW@8gkZBUWZeiV6apkK0oZ6eoUHsfwA "Haskell – Try It Online")
### Pointfree direct, 15 bytes
```
(*)=<<(/2).(+1)
```
Thanks @nimi for the idea!
[Try it online!](https://tio.run/##y0gszk7NyfmfpmCrEPNfQ0vT1sZGQ99IU09D21Dzf25iZh5QIjexwDdeQaOgKDOvRC9NUyHaUE/P0CD2/7/ktJzE9OL/uhHOAQEA "Haskell – Try It Online")
### Pointfree via `sum`, 16 bytes
```
sum.enumFromTo 1
```
[Try it online!](https://tio.run/##y0gszk7Nyflfraus4OPo5x7q6O6q4BwQoKCsW8uVZhvzv7g0Vy81rzTXrSg/NyRfwfB/bmJmnoKtQm5igW@8gkZBUWZeiV6apkK0oZ6eoUHsfwA "Haskell – Try It Online")
### Recursively, ~~22~~ 18 bytes
```
f 0=0;f n=n+f(n-1)
```
Thanks @maple\_shaft for the idea & @Laikoni for golfing it!
[Try it online!](https://tio.run/##y0gszk7Nyfn/P03BwNbAOk0hzzZPO00jT9dQ839uYmaegq1CbmKBb7yCRkFRZl6JXpqmQrShnp6hQex/AA "Haskell – Try It Online")
### Standard `fold`, 19 bytes
```
f n=foldr(+)0[1..n]
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P00hzzYtPyelSENb0yDaUE8vL/Z/bmJmnoKtQm5igW@8gkZBUWZeiV6apgJI1tAg9j8A "Haskell – Try It Online")
[Answer]
# [Java (OpenJDK 8)](http://openjdk.java.net/), 10 bytes
```
a->a++*a/2
```
[Try it online!](https://tio.run/##XU/BTsMwDD03X2Ht1BIWGEe67YjEgQs9Ig6hS6uU1IkSZ9I09duLC90FydJ7en5@tgd91lsfDA6n79mOwUeCgTWVyTrVZWzJelQvK6mFCPnL2RZap1OCN21RXIUoVjWRJoaztycYuVc2FC32H5@gY58qUVxFUXQ@QmmRwMIBdjXDHnaPjFKy49dSNJdEZlQ@kwqcQA7LjX2GDUi2S8Z3k7KjP6U31OSxtFVV8@wkuP5ftKy72Zjiesrtr/0rkulNvIeVHKGDw6y3Ry3lnX54mpfkaChHhE7pENylxGXdJCYx/wA "Java (OpenJDK 8) – Try It Online")
Took a moment to golf down from `n->n*(n+1)/2` because I'm slow.
But this isn't a real Java answer. It's definitely not verbose enough.
```
import java.util.stream.*;
a->IntStream.range(1,a+1).sum()
```
Not bad, but we can do better.
```
import java.util.stream.*;
(Integer a)->Stream.iterate(1,(Integer b)->Math.incrementExact(b)).limit(a).reduce(0,Integer::sum)
```
I love Java.
[Answer]
# APL, 3 bytes
```
+/⍳
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///P@1R2wRt/Ue9m4HMQyuAtKEBAA)
`+/` - sum (reduce `+`), `⍳` - range.
[Answer]
# [Taxi](https://bigzaphod.github.io/Taxi/), 687 bytes
```
Go to Post Office:w 1 l 1 r 1 l.Pickup a passenger going to The Babelfishery.Go to The Babelfishery:s 1 l 1 r.Pickup a passenger going to Cyclone.Go to Cyclone:n 1 l 1 l 2 r.[a]Pickup a passenger going to Addition Alley.Pickup a passenger going to The Underground.Go to Zoom Zoom:n.Go to Addition Alley:w 1 l 1 r.Pickup a passenger going to Addition Alley.Go to The Underground:n 1 r 1 r.Switch to plan "z" if no one is waiting.Pickup a passenger going to Cyclone.Go to Cyclone:n 3 l 2 l.Switch to plan "a".[z]Go to Addition Alley:n 3 l 1 l.Pickup a passenger going to The Babelfishery.Go to The Babelfishery:n 1 r 1 r.Pickup a passenger going to Post Office.Go to Post Office:n 1 l 1 r.
```
[Try it online!](https://tio.run/##rZLBTsMwDIZfxeoDRGJw6m3jwJFJbBemHbLWTS0yu0oydd3Ld20X6GCoCMQhiWLl/2z/cdBHatsngSCwFB/guSgow7SGO7Ddcv2plpS9HSrQUGnvkQ06MEJsetWqRFjoHdqCfImuURfY13Dq34mTtMcms8IYIfGWctRamHX6jd5OIeZ5ToGEYW4tNj/WvuYcnXFy4DxmfRXZD1vKMfIZOZqjflHHaMtVxqEzN6BeagpZ2b@prGZITglQASzQGQDkodYdjc2f3LsfnLM3OXSiNqfttz1eRP/1@WObU7SrAVS3I8kfrrftw@wM)
Un-golfed with comments:
```
[ n = STDIN ]
Go to Post Office: west 1st left 1st right 1st left.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery: south 1st left 1st right.
Pickup a passenger going to Cyclone.
Go to Cyclone: north 1st left 1st left 2nd right.
[ for (i=n;i>1;i--) { T+=i } ]
[a]
Pickup a passenger going to Addition Alley.
Pickup a passenger going to The Underground.
Go to Zoom Zoom: north.
Go to Addition Alley: west 1st left 1st right.
Pickup a passenger going to Addition Alley.
Go to The Underground: north 1st right 1st right.
Switch to plan "z" if no one is waiting.
Pickup a passenger going to Cyclone.
Go to Cyclone: north 3rd left 2nd left.
Switch to plan "a".
[ print(T) ]
[z]
Go to Addition Alley: north 3rd left 1st left.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery: north 1st right 1st right.
Pickup a passenger going to Post Office.
Go to Post Office: north 1st left 1st right.
```
It's 22.6% less bytes to loop than it is to use `x*(x+1)/2`
[Answer]
# Julia, 10 bytes
```
n->n*-~n/2
```
[Try it online!](https://tio.run/##yyrNyUw0/f8/zTZP1y5PS7cuT9/of0FRZl5JTp5GmoappuZ/AA)
### 11 bytes (works also on Julia 0.4)
```
n->sum(1:n)
```
[Try it online!](https://tio.run/##yyrNyUz8/z/NNk/Xrrg0V8PQKk/zf0FRZl5JTp5GmoappuZ/AA)
[Answer]
# [Starry](https://esolangs.org/wiki/Starry), ~~27~~ 22 bytes
*5 bytes saved thanks to [@miles](https://codegolf.stackexchange.com/users/6710/miles)!*
```
, + +  **       +   *.
```
[**Try it online!**](https://tio.run/##Ky5JLCqq/P9fR0EbCBW0tBQgAMhW0NL7/98UAA "Starry – Try It Online")
### Explanation
```
,             Read number (n) from STDIN and push it to the stack
 +            Duplicate top of the stack
 +            Duplicate top of the stack
  *           Pop two numbers and push their product (n*n)
*             Pop two numbers and push their sum (n+n*n)
       +      Push 2
   *          Pop two numbers and push their division ((n+n*n)/2)
.             Pop a number and print it to STDOUT
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 2 bytes
```
LO
```
[Try it online!](https://tio.run/##MzBNTDJM/f/fx///fxMA "05AB1E – Try It Online")
# How it works
```
     #input enters stack implicitly
L    #pop a, push list [1 .. a]
 O   #sum of the list
     #implicit output 
```
# Gauss sum, 4 bytes
```
>¹*;
```
[Try it online!](https://tio.run/##MzBNTDJM/f/f7tBOLev//00B "05AB1E – Try It Online")
# How it works
```
>       #input + 1
 ¹*     #get original input & multiply
   ;    #divide by two 
```
[Answer]
# [Check](https://github.com/ScratchMan544/check-lang), 5 bytes
```
:)*$p
```
Check isn't even a golfing language, yet it beats CJam!
[Try it online!](https://tio.run/##S85ITc7@/99KU0ul4P///6YA "Check – Try It Online")
## Explanation:
The input number is placed on the stack. `:` duplicates it to give `n, n`. It is then incremented with `)`, giving `n, n+1`. `*` multiplies the two together, and then `$` divides the result by 2. `p` prints the result and the program terminates.
[Answer]
# [MATL](https://github.com/lmendo/MATL), 2 bytes
```
:s
```
[Try it online!](https://tio.run/##y00syfn/36r4/39DAwA "MATL – Try It Online")
Not happy smiley.
[Answer]
# [dc](https://www.gnu.org/software/bc/manual/dc-1.05/html_mono/dc.html), 7 bytes
```
d1+*2/p
```
OR
```
d2^+2/p
```
OR
```
dd*+2/p
```
[Try it online!](https://tio.run/##S0n@b2j8P8VQW8tIv@D/fwA "dc – Try It Online")
[Answer]
# [Piet](https://www.dangermouse.net/esoteric/piet.html) + [ascii-piet](https://github.com/dloscutoff/ascii-piet), 16 bytes (4×4=16 codels)
```
tabR   Smm Amtqa
```
[Try Piet online!](https://piet.bubbler.one/#eJw9ikEKhDAQBP_S5w7MqAjmK9HDohEEjUL0tOzfd4Li0NBV9Hwx7lOED0GoLbVhNTBoxzt1EWWJeXubsCk8EDke8HDOgViXzVjFzizmEX7-rDkSSzqus2x9stc-VU_XT6u8IPj9AV-cJX8)
![](https://github.com/Bubbler-4/svg-stuff-and-tools/raw/76de552b548076b6a315241a12cfe551adb2dd76/images/CodeGolfSE/133109.svg)
### How it works
The code simply follows the border and then stops at the 3-cell L-shaped region. Basically uses the well-known formula, because setting up a loop here costs too many cells due to the necessary `roll` command.
![](https://github.com/Bubbler-4/svg-stuff-and-tools/raw/a03514b89d038fb77dcf99655db99a21bc5215d3/images/CodeGolfSE/133109-e.svg)
```
Command    Stack
inN        [n]
dup 1 +    [n n+1]
* 2 /      [n*(n+1)/2]
outN       []
```
This layout saves two black cells over the following linear, more straightforward (pun intended) layout:
# [Piet](https://www.dangermouse.net/esoteric/piet.html) + [ascii-piet](https://github.com/dloscutoff/ascii-piet), 18 bytes (2×9=18 codels)
```
tabrsaqtM     a mm
```
[Try Piet online!](https://piet.bubbler.one/#eJxVisEKhDAMRP9lzlNoVAT7K9XDUisIWoXunsR_31REMITMm5kcCNsY4by3lJbSsGJdqKEGMtBLx9e215VSDkSOOxyMMSCWeVUWq6Mu5gA3fZYciTntv2_p-qSvfapurW8V-4DF-QdRViU7)
![](https://github.com/Bubbler-4/svg-stuff-and-tools/raw/76de552b548076b6a315241a12cfe551adb2dd76/images/CodeGolfSE/133109-2.svg)
[Answer]
# Brainfuck, 24 Bytes.
I/O is handled as bytes.
```
,[[->+>+<<]>[-<+>]<-]>>.
```
## Explained
```
,[[->+>+<<]>[-<+>]<-]>>.
,                           # Read a byte from STDIN
 [                  ]       # Main loop, counting down all values from n to 1
  [->+>+<<]                 # Copy the i value to *i+1 and *i+2
           >[-<+>]          # Move *i+1 back to i
                  <-        # Move back to i, lower it by one. Because *i+2 is never reset, each iteration adds the value of i to it.
                     >>.    # Output the value of *i+2
```
[Answer]
# C++ (template metaprogramming), 80 bytes (?)
I'm not very sure if it is acceptable because you need to insert input into source, which seems to be permitted for languages like `///` only.
```
template<int N>struct s{enum{v=N+s<N-1>::v};};template<>struct s<1>{enum{v=1};};
```
Example:
```
#include <iostream>
int main()
{
    std::cout<<s<10>::v;
    return 0;
}
```
[Answer]
# [,,,](https://github.com/totallyhuman/commata), 6 [bytes](https://github.com/totallyhuman/commata/wiki/Code-page)
```
:1+×2÷
```
## Explanation
```
:1+×2÷
:       ### duplicate
 1+     ### add 1
   ×    ### multiply
    2÷  ### divide by 2
```
If I implement range any time soon...
```
rΣ
```
[Answer]
# [Bash](https://www.gnu.org/software/bash/), 13 bytes
```
seq -s+ $1|bc
```
[Try it online!](https://tio.run/##S0oszvj/vzi1UEG3WFtBxbAmKfn///@mAA "Bash – Try It Online")
`seq` generates a sequence. `seq 5` generates a sequence of numbers from 1 to 5 with a default increment of 1.
`seq` with the `-s` flag uses a string parameter to separate the numbers (the default separator is `\n`).
So `seq -s+ $1` generates numbers from 1 to `$1`, the first argument, using `+` as the separator. With an argument of `5`, this generates `1+2+3+4+5`.
Now this is piped into `bc` using `|bc` to calculate the result of this mathematical expression and that value it outputted.
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 13 bytes
```
.+
$*
1
$`1
1
```
[Try it online!](https://tio.run/##K0otycxL/P9fT5tLRYvLkEslwZDL8P9/UwA "Retina – Try It Online") Explanation: The first and last stages are just unary ⇔ decimal conversion. The middle stage replaces each `1` with the number of `1`s to its left plus another `1` for the `1` itself, thus counting from `1` to `n`, summing the values implicitly.
[Answer]
# [Trilangle](https://github.com/bbrk24/Trilangle), 9 bytes
*How appropriate that the triangular language is computing triangular numbers.*
```
?2')2!*:@
```
Try it on [the online interpreter](https://bbrk24.github.io/Trilangle/?i=5#%3F2%27)2!*%3A%40)!
Unwraps to this triangular grid:
```
   ?
  2 '
 ) 2 !
* : @ .
```
Instructions are executed in this order:
* `?`: Read an integer from STDIN
* `2`: Duplicate the top of the stack
* `)`: Increment the top of the stack
* `*`: Multiply the two values off the top of the stack
* `'2`: Push the number 2 to the stack
* `:`: Divide the two values off the top of the stack
* `!`: Print the top of the stack as a decimal number
* `@`: Terminate program.
Effectively identical to this C program:
```
#include <stdio.h>
int main() {
  // ?
  int i; while(!scanf("%i", &i)) getchar();
  // 2)*
  i *= i + 1;
  // '2:
  i /= 2;
  // !
  printf("%d\n", i);
  // @
  return 0;
}
```
]