text:
Setup the tribal totem for the requested weather
There is a Sioux village. It has a totem:
             __
         ___|  |___
   \/    \        /    \/
   /\     ``|  |``     /\
  /^^\      |  |      /^^\
 / /\ \     |  |     / /\ \
''''''''''''''''''''''''''''

The totem lets the Sioux mastering the weather for helping in their different tasks. Help the villagers properly decorating the totem for invoking the adequate weather. The totem has several parts:
             __
         ___|AA|___
   \/    \BBBBBBBB/    \/
   /\     ``|CC|``     /\
  /^^\      |DD|      /^^\
 / /\ \  13 |EE| 42  / /\ \
''''''''''''''''''''''''''''

A is for sun () or clouds ww
B is for rain """""""" or snow ::::::::
C is for thunderstorm zz
D is for wind ~~
E is for fog ==

But that's not all. The totem needs weather dancers. The more elements are invoked, the higher the number of required dancers is. If there is one element invoked, a dancer is needed. Two elements, two dancers. Beyond four elements, there will always be at most four dancers. If there is no element invoked, no dancers are needed. The totem needs to rest.
The weather dancers must appear in the order 1234. For instance if there are two dancers, the slots 1 and 2 must be occupied. Moreover, each dancer performs a different figure:

1 is T
2 is Y
3 is K
4 is X

Now, the villagers will express their weather wishes. They will pronounce a sentence containing the weather element(s) they would like to have. Setup the totem and the dancers for fulfilling their wishes.
Challenge
Write a program which takes a string as input, matches the elements in the sentence (sun, rain, …), and outputs the full village with the totem properly set and its dancers. Your program does not have to check the correctness of the input string (e.g. it won't contain both sun and clouds). It must matches words (in the literal sense):

The input string X says: "I like the wind, it blows the worries away" matches wind, because the comma is not part of the word
The input string Y says: "I hope the weather won't get too windy" does not match wind, because windy and wind are two different words

The word(s) to match are guaranteed to be in the quoted part of the input string (the first part designating who is talking will never contain a word that could be matched).
Examples
The squaw says: "I want sun and wind for drying the clothes"
             __
         ___|()|___
   \/    \        /    \/
   /\     ``|  |``     /\
  /^^\      |~~|      /^^\
 / /\ \  T  |  |  Y  / /\ \
''''''''''''''''''''''''''''

The warrior thinks: "A good thunderstorm will afraid the invaders. Or a snow storm. Or an impenetrable fog. Or an oppressive sun."
             __
         ___|()|___
   \/    \::::::::/    \/
   /\     ``|zz|``     /\
  /^^\      |  |      /^^\
 / /\ \  TK |==| XY  / /\ \
''''''''''''''''''''''''''''

The papoose shouts: "I WANNA GO OUTSIDE PLAY UNDER THE SUN!"
             __
         ___|()|___
   \/    \        /    \/
   /\     ``|  |``     /\
  /^^\      |  |      /^^\
 / /\ \  T  |  |     / /\ \
''''''''''''''''''''''''''''

The wise grandma whispers: "The totem is an illusion"
             __
         ___|  |___
   \/    \        /    \/
   /\     ``|  |``     /\
  /^^\      |  |      /^^\
 / /\ \     |  |     / /\ \
''''''''''''''''''''''''''''

The shaman confides: "I perform my magic hidden in the fog, under the rain or at least under heavy clouds"
             __
         ___|ww|___
   \/    \""""""""/    \/
   /\     ``|  |``     /\
  /^^\      |  |      /^^\
 / /\ \  TK |==|  Y  / /\ \
''''''''''''''''''''''''''''

The village chief claims: "The meat of bison is better preserved in the snow, or dried under a burning sun. My Pa' used to say that heavy wind and a thunderstorm could help too, but I have no clue how. And despite everyone contradicting me, I am persuaded a good fog will do as well"
             __
         ___|()|___
   \/    \::::::::/    \/
   /\     ``|zz|``     /\
  /^^\      |~~|      /^^\
 / /\ \  TK |==| XY  / /\ \
''''''''''''''''''''''''''''

This is code-golf so the shortest answer in bytes win. Explanations are encouraged.

Can we assume that we won't get both sun and clouds, or both rain and snow?

@HyperNeutrino This is already specified in the challenge.

Ah. I've done that many times (missing parts of the challenge). Sorry :P

lol +1 for The papoose shouts: "I WANNA GO OUTSIDE PLAY UNDER THE SUN!". Also this challenge was a lot less painful and a lot more fun than I thought it would be so thanks for the challenge :P :)

I miss challenges like this one. Not too hard, not too FGITW, not too golfing languages and actually requires you to code rather than find a small 4-byter

I've been waiting for this to be posted since I saw it in the sandbox :) Now to actually answer...

Python, 527 524 508 504 481 474 462 461 bytes
from re import*
a=r"""!!! __
!! ___|AA|___
   \/!\BBBBBBBB/!\/
   /\! ``|CC|``! /\
  /^^\!  |DD|!  /^^\
 / /\ \  02 |EE| 31  / /\ \
""";s={'sun':'A2()','clouds':'A2w','rain':'B2"','snow':'B2:','thunderstorm':'C2z','wind':'D2~','fog':'E2='};i=0
for y in[w for w in split('\W+',input().lower())if w in s]:i+=1;z=s[y];w=int(z[1]);a=sub(z[0]*w,(z[2:]*w)[:w],a)
for y in range(min(i,4)):a=sub(str(y),'TYKX'[y],a)
print(sub('!',' '*4,sub('[ABCDE0123]',' ',a))+"'"*28)

Try it online!

In my last challenge I was disappointed how everyone used regex. I thought that with this one, I would have none. Well, I'm kinda surprised…

@Jim well, they are definitely not the main part of the function

I posted another Python solution that uses a fairly different algorithm; if you think it would be better to just use it as a golf of yours, I'll delete mine as a Too Similar to yours.

@HyperNeutrino I was just golfing it and I think I hit some of the stuff you used btw. I generally don't mind other solutions the same lang as mine, though I usually prefer not to post these

485 bytes

And okay, thanks. I might find some stuff in yours too that I could use.

@HyperNeutrino thanks, *481. you missed my skip-last-assignment update

462 by using sub instead of replace

Grr you're winning now. I have to outgolf you again now... xD

Python 3, 473 464 460 bytes
import re
x=re.split('\W+',input().lower())
L='sun clouds rain snow thunderstorm wind fog'.split()
q=sum(map(x.count,L))
print(r'''!    __
!___|#|___
" \/"  \$/" \/
" /\"   ``|%%|``"  /\
  /^^\""  |&&|"" /^^\
 / /\ \  13 |''| 42 / /\ \
'''.translate({33:' '*9,34:' '*2,35:' (w )w'[(L[0]in x)+2*(L[1]in x)::3],36:' ":'[(L[2]in x)+2*(L[3]in x)]*8,37:' z'[L[4]in x],38:' ~'[L[5]in x],39:' ='[L[6]in x],49:' T'[q>0],50:' Y'[q>1],51:' K'[q>2],52:' X'[q>3]})+"'"*28)

Try it online!
-9 bytes
-4 bytes thanks to ovs

I don't see why you would need s. Just merge your last two lines to print(r...28) for 460 bytes.

@ovs whoops forgot about that. Thanks!

JavaScript (ES6), 417 bytes
(s,i=x=>s.toLowerCase()[q](/\W+/).includes(x[0]),g=x=>y=>i(x)?y[0]:(j--,"  "),j=4,t="||   \\/|   /\\|  /^^\\| / /\\ \\"[q="split"]`|`.map(x=>x[p="padEnd"](9)))=>`    __    n___|${i`sun`?"()":g`clouds``ww`}|___n${"\\"[p](9,i`rain`?'"':g`snow``:`)}/n \`\`|${g`thunderstorm``zz`}|\`\` n   |${g`wind``~~`}|   n02 |${g`fog``==`}| 31`.replace(/\d/g,m=>m>j?" ":"TYKX"[m])[q]`n`.map((v,k)=>t[k]+v+t[k]).join`
`+`
`[p](28,"'")

The idea here was to generate the totem pole first, then add the mirrored tikis on both sides of it.
Includes two helper functions: i, which checks if a string is one of the words in the input; and g, which does i and returns the given string or "  ". g also counts how many elements are missing to be used for the dancers at the bottom.
Test Snippet

let f=
(s,i=x=>s.toLowerCase()[q](/\W+/).includes(x[0]),g=x=>y=>i(x)?y[0]:(j--,"  "),j=4,t="||   \\/|   /\\|  /^^\\| / /\\ \\"[q="split"]`|`.map(x=>x[p="padEnd"](9)))=>`    __    n___|${i`sun`?"()":g`clouds``ww`}|___n${"\\"[p](9,i`rain`?'"':g`snow``:`)}/n \`\`|${g`thunderstorm``zz`}|\`\` n   |${g`wind``~~`}|   n02 |${g`fog``==`}| 31`.replace(/\d/g,m=>m>j?" ":"TYKX"[m])[q]`n`.map((v,k)=>t[k]+v+t[k]).join`
`+`
`[p](28,"'")

let tests = [`The squaw says: "I want sun and wind for drying the clothes"`,`The warrior thinks: "A good thunderstorm will afraid the invaders. Or a snow storm. Or an impenetrable fog. Or an oppressive sun."`,`The papoose shouts: "I WANNA GO OUTSIDE PLAY UNDER THE SUN!"`,`The wise grandma whispers: "The totem is an illusion"`,`The shaman confides: "I perform my magic hidden in the fog, under the rain or at least under heavy clouds"`,`The village chief claims: "The meat of bison is better preserved in the snow, or dried under a burning sun. My Pa' used to say that heavy wind and a thunderstorm could help too, but I have no clue how. And despite everyone contradicting me, I am persuaded a good fog will do as well"`];I.innerHTML+=tests.map(t=>"<option>"+t).join``
<select id=I oninput="O.innerHTML=(idx=I.selectedIndex)?(t=tests[idx-1])+'\n\n'+f(t):''" style="width:90vw"><option>---Tests---</select>


text:
Sum of all integers from 1 to n
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.
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="
"+e.body.replace(OVERRIDE_REG,"")+"
")});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;/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;}
 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

Closely related

@FryAmTheEggman Sorry - had a bit of a brain fart there. I see what you mean.

I expected a bunch of very short answers (10 or 15 bytes) all either using the summation formula or a language summation feature. But DANG! A bunch of them at 2 bytes!? Is this now the "golf of code golfs," or have there been any others with 2-byte solutions (or what about 1 byte)?

@Aaron you got ninja'd by Husk, which was just posted with a 1 byte solution

@Mayube Wow.... I originally thought this was a silly question, "It's just going to be a bunch of different languages typing out the summation formula, or if it's built in then doing sum(x); why would someone bother writing such a silly so-called golf?" But now I don't know what to say. I have been schooled. I will +1 this question after all.

@steenbergh Working on it right now.

I suggest a stack snippet.

@programmer5000, steenbergh I've added the leaderboard snippet. Thanks for your suggestions!

Related: http://www.minecraftforum.net/forums/off-topic/computer-science-and-technology/hardware-software-support/498403-code-golf-sum-of-integers-0-to-n

@JerryJeremiah how?

Pyth, 2 bytes
sS

Try it online! Implicit input. S is 1-indexed range, and s is the sum.

Finally, Pyth(on) code sounds like a snake.

This is the perfect challenge for Pyth...

I was going to answer this, but I guess not

Husk, 1 byte
Σ

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.

Out of curiosity, does this occur because the number is cast to a range and then summed, or is this actually hardcoded?

@FryAmTheEggman this is actually hardcoded, and is similar to the behavior of another builtin, Π, which can compute the product of all elements of a list or the factorial of a single number

Σ is a two byte unicode character on my machine. I guess you use code page 1253? https://msdn.microsoft.com/en-us/library/cc195055.aspx

@gmatht Husk's code page

Brain-Flak, 16 bytes
({({}[()])()}{})

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.
)

Piet, 161 bytes / 16 codels
You can interpret it with this Piet interpreter or upload the image on this 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:

Explanation
The highlighted text shows the current stack (growing from left to right), assuming the user input is 5:
  Input a number and push it onto stack
5

  Duplicate this number on the stack
5 5

  Push 1 (the size of the dark red area) onto stack
5 5 1

  Add the top two numbers
5 6

  Multiply the top two numbers
30

  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

  Divide the second number on the stack by the first one
15

  Pop and output the top number (interpreted as number)
[empty]

  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):

We transitioned from an intelligible text (e.g. C) to unintelligible text (e.g. Jelly) to images... What next? :P

+1 I haven't actually seen a Piet answer with an explanation before

How did you get 16 for the number of codels? I count 33 (11 by 3), and even just counting the codels that "do something," I can't make it come out to 16. (It's not a super important question since you're scoring the solution in bytes, but I found it puzzling.)

Oasis, 3 bytes
n+0

Try it online!
How it works
n+0
  0    a(0)=0
n+     a(n)=n+a(n-1)

And here I was, all of my life thinking that n+0 is n...

JavaScript (ES6), 10 bytes
n=>n*++n/2

Example

let f =

n=>n*++n/2

console.log(f(5))

n*-~n/2 also works, but only for n < 2**31

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]

It seems a shame to skip 13, 14 and 17…

It seems like a next challenge....or at least help me to complete the list.

You can have f@0=0;f@i_:=i+f[i-1] for 20 bytes, although that doesn't help fill the holes.

I will add it because it differs!

17 bytes: ⌊(2#+1)^2/8⌋& (inspired by the OEIS page)

…or if you don't like non-ASCII characters, Tr[Range@#^3]^.5&

I still don't have anything for 13 or 14 bytes (apart from just un-golfing your shorter answers), but here are another 26 with larger byte-counts.

PolygonalNumber doesn't seem to do anything in my version (10.2) of Mathematica. Do you need to import something?

@MarkS. on 10.4 works fine

@Notatree For your list, here is a candidate for 35: Array[Boole[#2>=#]&,{#,#}]~Total~2&

Also 9 bytes: Tr@*Range

14 bytes: 1/2/Beta[#,2]& By reference Beta[x,y] = Gamma[x] * Gamma[y] / Gamma[x+y], so dividing 1/2 by Beta[#,2] gives (#+1)!/(2*(#-1)!), which is the desired result.

@user71546 very nice! thanks

Python 2, 24 16 bytes
-8 bytes thanks to FryAmTheEggman.
lambda n:n*-~n/2

Try it online!

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! 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 and @Peter for -1.

You should probably use shr instead of sar, to treat your output as unsigned (no change in code size).  (Spotted by @CodyGray and pointed out in his 7-byte add+loop answer).

This looks optimal for performance in an implementation of the closed-form formula, but you can save a byte by using the one-operand form of mul %edi or imul %edi (each 2B) instead of the 3B two-operand form.  It clobbers EDX with the high-half result, but that's fine.  Multi-operand imul was introduced later than the one-operand form, and has a 2-byte opcode with a 0F escape byte.  Any of the three options will always produce the same result in eax, it's only the high half that depends on signed vs. unsigned.

C# (.NET Core), 10 bytes
n=>n++*n/2

Try it online!

Polyglots with JS.

Jelly, 2 bytes
RS

Try it online!
Explanation
RS

    implicit input
 S  sum of the...
R   inclusive range [1..input]
    implicit output

Gauss sum, 3 bytes
‘×H

Explanation
‘×H

     implicit input
  H  half of the quantity of...
‘    input + 1...
 ×   times input
     implicit output

This also works in Anyfix :P (not on TIO)

Octave, 22 19 bytes
Because arithmetic operations are boring...
@(n)nnz(triu(e(n)))

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.

Is this actually shorter than the numerical version?

@Challenger5 No, But the numerical version is boring: @(n)sum(1:n)

Or 16 bytes with arithmetic operations, but no sum.

Java (OpenJDK 8), 10 bytes
n->n++*n/2

Try it online!

Haskell, 13 bytes
This is the shortest (I thinkthought):
f n=sum[1..n]

Try it online!
Direct, 17 13 bytes
f n=n*(n+1)/2

Thanks @WheatWizard for -4 bytes!
Try it online!
Pointfree direct, 15 bytes
(*)=<<(/2).(+1)

Thanks @nimi for the idea!
Try it online!
Pointfree via sum, 16 bytes
sum.enumFromTo 1

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!
Standard fold, 19 bytes
f n=foldr(+)0[1..n]

Try it online!

Java (OpenJDK 8), 10 bytes
a->a++*a/2

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.

If you want it to be even more verbose why use a lambda!? :P

I was aiming for verbose lambdas, I could write a full program if I wanted to be particularly eloquent :P

The exact same solution was already posted

I must have missed it, but in any case, I tend to not look at the contents of other answers. I prefer to write my own golf.

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!
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

APL, 3 bytes
+/⍳

Try it online!
+/ - sum (reduce +), ⍳ - range.

This depends on the indexing. If indexing is set to 0, then you'd need an additional 2 bytes 1+

@Werner indexing is default 1 so I didn't specify. its common here to specify only when using ⎕IO←0 (and it does not included in byte count)

05AB1E, 2 bytes
LO

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!
How it works
>       #input + 1
 ¹*     #get original input & multiply
   ;    #divide by two

ÝO also works and means hello.

L0 and behold..

The Gaussian sum can be shortened by one byte without ¹, as implicit input can be reused.

Starry, 27 22 bytes
5 bytes saved thanks to @miles!
, + +  **       +   *.

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

22 bytes.

@miles Thanks! Very good idea!

Julia, 10 bytes
n->n*-~n/2

Try it online!
11 bytes (works also on Julia 0.4)
n->sum(1:n)

Try it online!

Check, 5 bytes
:)*$p

Check isn't even a golfing language, yet it beats CJam!
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.

MATL, 2 bytes
:s

Try it online!
Not happy smiley.

Damn it, finally a challenge I could easily answer in MATL, but you beat me to it :(

dc, 7 bytes
d1+*2/p

OR
d2^+2/p

OR
dd*+2/p

Try it online!

Piet + ascii-piet, 16 bytes (4×4=16 codels)
tabR   Smm Amtqa

Try Piet online!

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.

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 + ascii-piet, 18 bytes (2×9=18 codels)
tabrsaqtM     a mm

Try Piet online!

,,,, 6 bytes
:1+×2÷

Explanation
:1+×2÷

:       ### duplicate
 1+     ### add 1
   ×    ### multiply
    2÷  ### divide by 2

If I implement range any time soon...
rΣ

Retina 0.8.2, 13 bytes
.+
$*
1
$`1
1

Try it online! Explanation: The first and last stages are just unary ⇔ decimal conversion. The middle stage replaces each 1 with the number of 1s to its left plus another 1 for the 1 itself, thus counting from 1 to n, summing the values implicitly.

Beaten by 4 bytes in Retina 1.0.

@Deadcode Yeah, Retina 0.8.2 (which this answer is in, since Retina 1 didn't exist at the time) doesn't have an equivalent to Retina 1's w flag. Nice approach though!

I know, that's why I included the version number in my comment. And thanks.

Replacing 1 with $'1 or 1? with $\`` also works for the same byte count. Replacing 1with$`or$'results inbinomial(n,2)`.

Bash, 13 bytes
seq -s+ $1|bc

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.

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

It's pretty cool that Brainfuck is able to beat some higher-level languages in this challenge.

Is that legit for me to add an answer in Lenguage (just for fun) using your code? @ATaco

I don't think so, as it would be the same code, just encoded different. @V.Courtois

@ATaco Ahh you're right.

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;
}

Trilangle, 9 bytes
How appropriate that the triangular language is computing triangular numbers.
?2')2!*:@

Try it on the online interpreter!
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;
}

Python 2, 16 bytes
lambda n:-~n*n/2

Try it online!

Welcome to PPCG!

Is there any problem in my answer?

You can save a byte by changing it to print(n+1)*n/2 (Someone might already have print(n+1)*n/2 as answer though)

Thank you, sir but what is PPCG?

This community. Programming Puzzles & Code Golf.

Where is n defined?

Here n is Input.

Our consensus is that submissions must be full programs or functions, of which yours is neither (yours is a snippet, as in it needs other code to run properly). You could fix it by counting the assignment of input() to n in your submission or changing it to a function/lambda that returns the result. By the way, welcome to PPCG!

Triangular, 10 bytes
$\:_%i/2*<

Ungolfed:
   $
  \ :
 _ % i
/ 2 * <

Try it online!
The code, without directionals, is read as $:i*2_%.

$ reads an integer x, stack contains {x}.
: duplicates it, stack contains {x,x}.
i increments the top of stack, stack contains {x,x+1}.
* multiplies the top two stack values, stack contains {x*(x+1)}.
2 pushes 2 to the stack, stack contains {x*(x+1),2}.
_ divides the top two stack values, stack contains {x*(x+1)/2}.
% prints the top of stack, the equation x*(x+1)/2.

Idea thanks to caird, who asked me to post.

><>, 7+3 = 10 bytes
Calculates n(n+1)/2.
3 bytes added for the -v flag
:1+2,*n

Try it online!
Or if input can be taken as a character code:
><>, 9 bytes
i:1+2,*n;

Try it online!

Using the other math-approach ((n^2+n)/2) is also 7 bytes: ::*+2,n

Cubix, 12 10 bytes
*,)2I://O@

Initial version
....I:)*2,O@

Try it online!
Explanation
Expanded onto a cube, the code looks like this:
    * ,
    ) 2
I : / / O @ . .
. . . . . . . .
    . .
    . .

The instruction pointer (IP) starts at the I, moving east. It continues moving east until it comes across the / mirror, which reflects it north. When the IP reaches the top of the code, it wraps around to the last . on the third line, moving south. Then it wraps to the penultimate . on the last line, moving north. Then it reaches the / mirror again, which reflects it east, only for the next / to reflect it north again. This time, the IP wraps to the penultimate . on the third line, and then the last . on the last line.
The instructions are executed in the following order.
I:)*2,O@ # Explanation
I        # Take input as an integer and push it to the stack
 :       # Duplicate the input
  )      # Increment one of the inputs
   *     # Multiply the input by input+1
    2    # Push 2 to the stack
     ,   # Integer devide the multiplication result by 2
      O  # Output the result
       @ # End program

TI-Basic, 6 bytes
sum(randIntNoRep(1,Ans

Alternate solutions:
mean({AnsAns,Ans   6 bytes credits to @user1812
.5Ans(Ans+1        7 bytes
.5(AnsAns+Ans      7 bytes
Σ(I,I,1,Ans        9 bytes
sum(seq(I,I,1,Ans  9 bytes

Why not sum(randIntNoRep(1,Ans?

@lirtosiast True, that didn't occur to me.

PHP, 19 bytes
<?=$argn*-~$argn/2;
<?=$argn/2*++$argn;
<?=$argn*++$argn/2; # this one fails

using builtins, 29 bytes:
<?=array_sum(range(1,$argn));

loop, 31 bytes:
while($argn)$s+=$argn--;echo$s;

I guess a for too: for(;$argn;$s+=$argn--);echo$s;

x86-64 Machine Code, 7 bytes
31 C0
01 C8
E2 FC
C3

The above bytes define a function that accepts a single parameter, n, and returns a value containing the sum of all integers from 1 to n.
It is written to the Microsoft x64 calling convention, which passes the parameter in the ECX register. The return value is left in EAX, like all x86/x86-64 calling conventions.
Ungolfed assembly mnemonics:
       xor  eax, eax    ; zero out EAX
Next:  add  eax, ecx    ; add ECX to EAX
       loop Next        ; decrement ECX by 1, and loop as long as ECX != 0
       ret              ; return, with result in EAX

Try it online!
(The C function call there is annotated with an attribute that causes GCC to call it using the Microsoft calling convention that my assembly code uses. If TIO had provided MSVC, this wouldn't be necessary.)

By the unusual standards of code golf, you see that this iterative looping approach is preferable to approaches that use the more sane mathematical formula (n(n+1) / 2), even though it is obviously vastly less efficient in terms of run-time speed.
Using number theory, ceilingcat's implementation can still be beat by one byte. Each of these instructions are essential, but there is a slightly shorter encoding for IMUL that uses EAX implicitly as a destination operand (actually, it uses EDX:EAX, but we can just ignore the upper 32 bits of the result). This is only 2 bytes to encode, down from 3.
LEA takes three bytes as well, but there's really no way around that because we need to increment while preserving the original value. If we did a MOV to make a copy, then INC, we'd be at 4 bytes. (In x86-32, where INC is only 1 byte, we'd be at the same 3 bytes as LEA.)
The final right-shift is necessary to divide the result in half, and is certainly more compact (and more efficient) than a multiplication. However, the code should really be using shr instead of sar, since it's assuming that the input value, n, is an unsigned integer. (That assumption is valid according to the rules, of course, but if you know that the input is unsigned, then you shouldn't be doing a signed arithmetic shift, as the upper bit being set in a large unsigned value will cause the result to be incorrect.)
8D 41 01                lea    eax, [rcx+1]
F7 E9                   imul   ecx
D1 E8                   shr    eax, 1
C3                      ret

Now only 8 bytes (thanks to Peter Cordes). Still, 8 > 7.

Actually, one-operand imul ecx or mul ecx would work and save a byte in the closed-form implementation.  I didn't spot that right away; I was about to comment that it was optimal for both performance and code-size before realizing that an implicit eax operand was fine.

I wondered if add+loop would be shorter than imul while looking at the other answer.   Handy that there's a standard calling convention that passes the first arg in ecx

Wow, I can't believe I missed the one-operand form! I should really know by now not to say things like "cannot be beat". When will I learn?! Thanks, @Peter.

ArnoldC, 310 bytes
Removes unnecessary variable assignments from Courtois' solution and replaces them with GET TO THE CHOPPER and some arithmetic operations.
IT'S SHOWTIME
HEY CHRISTMAS TREE n
YOU SET US UP 0
GET YOUR ASS TO MARS n
DO IT NOW
I WANT TO ASK YOU A BUNCH OF QUESTIONS AND I WANT TO HAVE THEM ANSWERED IMMEDIATELY
GET TO THE CHOPPER n
HERE IS MY INVITATION n
GET UP 1
YOU'RE FIRED n
HE HAD TO SPLIT 2
ENOUGH TALK
TALK TO THE HAND n
YOU HAVE BEEN TERMINATED

Who doesn't like some good Arnold Schwarzenegger one liners :)
Try it online!

Hexagony, 14 bytes
?'+\.*:){=/\!2

Try it online! or Try it in a visual editor!
Expanded out, this is:
  ? ' +
 \ . * :
) { = / \
 ! 2 . .
  . . .

It took quite a bit of effort to get from a trivial 15 byte modification of Underslash's answer (using a char literal for 2), to get to 14 bytes. We save that one byte by managing to reuse all of '{= at the cost of an extra control flow instruction, as well as by terminating through an error of division by zero. There's still one no-op in the middle of this, so perhaps 13 is possible (but unlikely)?
Expanding it out by following the control flow, we find this:
?'+){=*'2{+*=2?*:!2)+*=2?*:

Removing all the extra stuff that are basically no-ops or are there to force a specific path of execution, we get:
?'+){=*'2{=:!=:
?                 Get the input
 '+               Duplicate it to an adjacent edge
   )              Increment it
    {=*           Multiply the original by the incremented one
       '2         Place 2 in an adjacent cell
         {=:      Divide the result by 2
            !     And print
             =:   Divide by zero

PowerShell, 22 18 bytes
param($n)$n*++$n/2

Try it online!
Saved 4 bytes thanks to FryAmTheEggman. Uses Gauss' formula. Ho-hum.

@FryAmTheEggman You'd think so, and you'd be right. :p

Ohm, 2 bytes
@Σ

Try it online!
Explanation
@Σ

    implicit input
@   inclusive range [1..input]
 Σ  sum
    implicit output

8th, 21 12 bytes
Saved 9 bytes thanks to FryAmTheEggman
dup 1+ * 2 /

Usage and output
ok> : sum dup n:1+ * 2 / ;

ok> 5 sum .
15

Actually, I think you saved 9 bytes thanks to Gauss ;) But thanks for the credit!

Ruby, 29 17 18 14 12 bytes
->n{n*-~n/2}

Execution:
->n{n*-~n/2}.call(5)

Gets The Value of the sum of 1 through 5
Try It Out!
People Who Have Saved Me A Few Bytes:
Saved 12 Bytes - DJMcMayhem
Saved 6 Bytes - FryAmTheEggman
Unsaved 3 Bytes (But Added Variable Handling) - Value Ink
Fixed A Misunderstanding, Saving me 8 Bytes - Value Ink
Saved 2 Bytes - G B
Many Thanks!

Wouldn't this be shorter with a different name? Like s instead of sum? Also, I think you could remove some spaces

Yep, just submitted it for speed, thanks for the notice!

Hi and welcome to PPCG! Our standard methods of input does not include the value being stored in a variable. I think you should be able to get a similar score using an unnamed lambda function. I think you can also do better by using Gauss' formula. I hope you enjoy your time here!

@FryAmTheEggman Thanks, You Saved Me 6 Bytes! I have also amended the input code so that it will accept input properly. Just about to post the update!

You still need to use a function. A snippet that assumes you set a variable beforehand and sets a new variable, like what you have, is not allowed. In Ruby, this is achieved with ->n{your code}, and it will automatically return whatever you input. Run with ->n{your code}.call(5)

You don't need the .call(5). That's just an example of how you'd call the function. For example, p ->n{your code}.call(5) prints the result of the function for n=5.

Value ink, thanks!

You can save another 2 bytes by using -~n instead of (n+1)

cQuents, 2 bytes
;$

This is the type of question that cQuents was designed for, and the type of question I implemented the ; mode for. Take that, Oasis!
Try it online!
Explanation
;    Mode: Sum (output sum of sequence up to input)
 $   Each item in the sequence is its (1-based) index

WendyScript, 17 bytes
<<f=>(x)x*(x+1)/2

f(100) // => 5050

Try it online!

TI-BASIC, 6 bytes
Beating Casio-basic by 3 bytes :)
6 byte version thanks to PT_ from cemetech (https://www.cemetech.net/forum/profile.php?mode=viewprofile&u=10064)
mean({N²,N

Two other, 7 byte, versions:
.5N(N+1

.5(N²+N

You might want to make TI-BASIC link to something.

TI-BASIC is the language that is used on most Texas instruments graphics calculators; what should I link to?

Or remove the brackets.

Alternatively sum(randIntNoRep(1,N

Wow! Didnt think of that :D It is unfortunate that randIntNoRep() is 2 bytes not 1.

Lean Mean Bean Machine, 38 32 bytes
-5 bytes thanks to Roman Gräf
-1 byte from changing LMBM's division peg from £ to ,
 O O
 i 2
 o
  )/
  ,
  /
 /
*
u

Explanation
Each O spawns a marble at program start. The first marble reads input and has it's value set to it, the 2nd has it's value set to 1, and the 3rd has it's value set to 2.
The n-marble is then duplicated, one copy falls all the way to a multiplication operator, where it will be held for a 2nd marble, the other falls into a subtraction operator, which the 1-marble then falls into after it.
This new n-1-marble then falls into a division operator (,), and the 2-marble falls in right after it.
This (n-1)/2-marble then falls into the multiplication operator, and the final n*(n-1)/2 marble falls into a u peg, where its value is printed, and the marble is destroyed.

Isn't there decrement peg? I'm pretty sure it is either ) or (

@RomanGräf I literally used that peg in another challenge like 5 minutes before writing this answer, I'm an idiot :P

I also forgot that despite being typeable on my UK keyboard layout, £ is not a 1-byte character. Changed division character to ,

I don't thinm editing the name of a feature after the realese of the challenge is valid tho...

@RomanGräf Community Consensus allows newer versions of languages, and given this is not at all a change specific for this challenge (having the division operator be 2 bytes is a pretty big issue), I don't think it's a problem

Bash, 26, 19 bytes
echo $[($1+1)*$1/2]

Try it online!
19 bytes for the code, thanks to rexkogitans.

echo $[($1+1)*$1/2] 19 bytes

@rexkogitans Edited! Thanks

Brachylog, 2 bytes
⟦+

Try it online!
Explanation
⟦      Range: [0, …, Input]
 +     Sum:   0 + … + Input

brainfuck, 24 bytes
Input number in base255(ASCII), use bigger cells for larger numbers, outputs also in base255.
,[[>+>+<<-]>[-<+>]<-]>>.

Try it online!
For bigger cells.
    ,[         Get input in base 255 mod 2^bit
         [ >+  Copy it left(to preserve index)
           >+  and left left to accumulate the sum
     <<- ]     decrement index to break loop
         >     Move to the first copy, index'in
         [-<+>]Move it back, restoring the index
  <- ]         Decrement index, let function run again until 0
    >>. Print sum

Symbolic Python, 35 33 18 16 bytes
_=-~_*_/-~(_==_)

Try it online!
Uses the direct formula for triangle numbers, (n+1)(n/2):
_=                  # Set output to
  -~_               #   (n+1)
     *_             #   *n
       /-~(_==_)    #   /2

Alchemist, 40 bytes
0x+_->a+Out_I
0_+0x+a->x
x+a->_+x
x+0a->

Outputs in unary, try it online or try it with automatic conversion to decimal!
Explanation
We'll 3 types of atoms the \$\texttt{_}\$-, \$\texttt{x}\$- and \$\texttt{a}\$-atoms:

\$\texttt{_}\$ initially is the input
\$\texttt{x}\$ is to make sure the computation is deterministic
\$\texttt{a}\$

# When there is no x-atom but still _ left, transform it to a and output I
0x + _ -> a + Out_I
# If there are no _- and x-atoms but still at least one a, we remove one a and add an x
0_ + 0x + a -> x
# If there is an x-atom, exchange all a-atoms for _-atoms
x + a -> _ + x
# Once we're done with that, remove the x-atom (this makes the first rule applicable again, creating a loop)
x + 0a ->
So essentially we transform each \$\texttt{_}\$ to \$\texttt{a}\$ while outputting an \$\texttt{I}\$, remove one \$\texttt{a}\$ and exchange them back to \$\texttt{_}\$, until there are no \$\texttt{a}\$-atoms and no rule is applicable anymore - terminating the progress of the universe.

:/ 64

Vyxal s, 1 byte
ɾ

Inclusive range of 1 to input, and s flag sums the stack.
Try it!

Wouldn't this count as 2 since the flags are counted?

@Underslash flags aren't counted

Unless I'm remembering wrong, aren't flags counted as a byte each because you can abstract away code with them?

@Underslash Nope. Instead, "Vxyal s" is considered an entirely separate language from "Vyxal".  I'm not sure what you mean by "abstract away code", but overuse of command like flags to store code makes the answer violate the standard loophole "using a made-up language designed specifically for the challenge"

tinylisp, 30 bytes
(d F(q((n)(i n(a n(F(s n 1)))0

Try it online!

HP UserRPL, 5.5 bytes
The source, pretty-formatted and commented:
«
  'X' @function@
  DUP @variable@
  1 @start@
  4 ROLL @end, ...is programm input@
  SEQ @create-list@
  ΣLIST @sum list items, equiv: « + » STREAM@
»

When saved in the calculator, @comments@ and extra spaces are lost.
The source you'll retrieve on your computer, using ASCII should look like
\<< 'X' DUP 1 4 ROLL SEQ \SigmaLIST \>>

In calculator, programs are saved with some kind of tokenisation where DUP and ROLL aren't 3 bytes but only half each.

F# (.NET Core), 12 17 bytes
let s x=(x+1)*x/2

Try it online!

Welcome to Code Golf! I don't know F#, but is this really a valid function definition? It doesn't look like a complete declaration or a expression.

I think this should be either let s x=(x+1)*x/2 or fun x->(x+1)*x/2.  x=(x+1)*x/2 is just a part of let s x=(x+1)*x/2.

Personally I agree with you and that's what I would consider a full submission. However looking at the C# and ES6 submissions, the line between "function" (just the math) and "function" (everything needed to call it for any n) is a bit blurred?

You either declare a function, or write a expression whose value is a function. The C# and ES6 submissions are lambda expressions, equivalent to fun x->(x+1)*x/2 in F#.

Fair enough. FWIW, the lambda solution is worse, what with needing fun and 2 extra brackets and still needs whitespace to come close to a similar size. Edited to include let s (+5).

fun x->(x+1)*x/2 is already a full lambda solution. The extra whitespace and brackets are caused by by TIO's limitation. You don't need to include them in your byte count.

AArch64 machine code, 12 bytes
0:  9b000000  madd  x0, x0, x0, x0
4:  d341fc00  lsr   x0, x0, #1
8:  d65f03c0  ret

Equivalent to:
uint64_t f(uint64_t n) {
  n = (n * n) + n;
  n = n >> 1;
  return n;
}

To test it, compile and run this C code with a GCC compatible compiler on AArch64 hardware via a Linux distro, Termux, Windows ARM64, etc.
#include <inttypes.h>
#include <stdio.h>
static const uint32_t d[] __attribute__((section(".text"))) = {
  0x9b000000, // madd x0, x0, x0, x0
  0xd341fc00, // lsr  x0, x0, #1
  0xd65f03c0, // ret
};
int main(void) {
  uint64_t (*f)(uint32_t) = d;
  uint32_t n = 5;
  scanf("%" SCNu32, &n);
  printf("%" PRIu64 "\n", f(n));
}

Note that I limited it to 32-bit inputs in the test code, because it overflows on the multiply-add when n >= (1 << 32).
It should work even in big-endian mode :)

C, 56 47 bytes
main(n){scanf("%d",&n);printf("%d",n*(n+1)/2);}

This is my first attempt at any code golf of any kind. Submitted as I saw that there were no other answers for C.
Old code:
int main(){int n;scanf("%d",&n);printf("%d",n*(n+1)/2);}

Thanks to programmer5000 for the help. :)

Welcome to the site! Nice first golf! You may be interested in some tips for golfing in C.

you can use -~n instead of (n+1) to make it 45 bytes  main(n){scanf("%d",&n);printf("%d",n*-~n/2);} :)

shortC,  44  29 bytes
Bn){K"%d",&n);R"%d",n*(n+1)/2

Try it online!
Just a shortCed version of this. Any help would be appreciated.

29 bytes

16 bytes because functions are allowed

14 bytes

MUMPS, 15 bytes
r n w !,n*n+n/2

Accepts user input (r n) and writes a new line along with the sum (w !,n*n+n/2). Order of operations doesn't matter in MUMPS: It goes from left to right except when there are parentheses.

Welcome to PPCG!

R, 13 bytes
sum(1:scan())

Saved 9 bytes thanks to Giuseppe and Max Lawnboy.

Would be shorter if you used n=scan() instead of defining a function.

And it would be even shorter to just use sum(1:scan())

This is not a valid R code. I believe this is what you were aiming at f=function(n)sum(1:n).

^ You're right, I think when I removed the spaces I was too quick as I did run it in R and just c/p'ed it over.

It should be sum(1:scan()), not sum(1:scan(n)).

@djhurio I don't think that'll work...pretty sure that throws an error

@Giuseppe, this is what I am saying. sum(1:scan()) is correct code.

No it isn't, you need to handle printing in a full program.

C, 22 bytes
With preprocessor
#define F(n) (n+1)*n/2

or 24 bytes with code and math
F(n){return (n+1)*n/2;}

or 27 bytes with recursive code
F(n){return n?n+F(n-1):0;}

eliminate spaces: #define F(N)(n+1)*n/2, F(N){return(n+1)*n/2};

And for the "code and math" section, you don't need the semicolon after the }.

Um ... actually the first two solutions don't work... C is case sensitive!

also change (n+1) to -~n: #define F(n)-~n*n/2

Vim, 4̶6̶ 25 17 16 15 keystrokes
Thanks @CowsQuack for -9 bytes!
YP<C-a>Jr*0C<C-r>=<C-r>"/2⏎

Try it online!
Ungolfed/Explained
YP                           " duplicate line containing N
  <C-a>                      " increment the first line
       J                     " join the two lines
        r*                   " substitute space between N and N+1 with *
          0C                 " delete line (store in " register) and insert
            <C-r>=        ⏎  "   the expression
                  <C-r>"     "   from the " register
                        /2   "   divided by 2

Forth, 17 bytes
Defines a word (function) that returns n*(n+1)/2.
: f dup 1+ * 2/ ;

Try it online

Full program with the same byte count:
key dup 1+ * 2/ .

Try it online - input is a single character, like BF.

J, 6 4 bytes
2!>:

Edit: I forgot that the binomial coefficient formula existed, so that lowers the bytecount. Also this is on the REPL or as a function with the input taken as the right argument. The other solutions need to be on the REPL, which I forgot to mention.
First post in a while, figured I'd submit the language I've been trying to learn recently. Not sure if you can specify one-indexing for ranges in J like with APL.
Explanation
2!>:
  >:  Increment
2!    n Choose 2

Previous solution (6 bytes)
Explanation below
+/i.>:
    >:  Add 1
  i.    Range [0,n+1)
+/      Sum

7 byte solutions
Explanations beneath each
-:(*>:)
  (*>:)  Hook: n * (n+1)
-:       Halve

-:(+*:)
  (+*:)  Hook: n^2 + n
-:       Halve

Neim, 3 2 bytes
First Neim answer

Try it online!
Explanation
   # Gets inclusive range from 0 to input
   # Sum the list

Saved a byte due to Okx

Nein has implicit input, so you can remove the first byte :)

@Okx I could've sworn i tried that, thanks.

Positron, 27 bytes
Positron is a new practical language by @HyperNeutrino.
function{return$1*($1+1)/2}

Try it online!

Yay I'm happy :D

Perl 6, 11 bytes
{[+] 1..$_}

Try it
{ } creates a lambda block with implicit parameter $_
1 .. $_ creates a Range object
[+] reduces it using the &infix:«+» operator.
(Rakudo actually calls the sum method on the Range object if you haven't lexically modified the &infix:«+» operator, and the sum method knows how to calculate the result without iterating through all of the values)

You can save 2 more bytes with {[+] ^$_}

@Massa That would exclude the $_ as it is short for 0 ..^ $_, so it would need to be ^$_+1 which is exactly the same length as what I have.

Element, 32 Bytes
_'1 z;0 t;[z~2:z;t~+t;z~1+z;]t~`

Try it online!
Probably can go shorter, but late now...

Excel, 12 bytes
=(A1+1)/2*A1

Or, alternatively:
=(A1^2+A1)/2

Instead of counting all n elements, take the average of the n elements, and multiply it by the number of elements.

Röda, 13 bytes
{seq 1,_|sum}

Try it online!

ArnoldC, 301 bytes
Well if Leo can find a way to do it in one byte, this is my way of throwing in the towel.
With the language based on the guy who never surrenders.
(And studying for the precalc final, you know, n(n+1)/2 is a formula I won't forget now, right?)
As of now, there's not really a way to take input in from the console from Try It Online, but this guy supposedly added something here.
Assuming that works, this code should do:
IT'S SHOWTIME
HEY CHRISTMAS TREE n
YOU SET US UP 0
GET YOUR ASS TO MARS n
DO IT NOW
WHO IS YOUR DADDY AND WHAT DOES HE DO
HEY CHRISTMAS TREE a
YOU SET US UP n
GET TO THE CHOPPER a
HERE IS MY INVITATION a
GET UP 1
YOU'RE FIRED n
HE HAD TO SPLIT 2
ENOUGH TALK
TALK TO THE HAND a
YOU HAVE BEEN TERMINATED

If not, this should work, manually assigning variable n (although it's a bit against the challenge)
IT'S SHOWTIME
HEY CHRISTMAS TREE n
YOU SET US UP 3
HEY CHRISTMAS TREE a
YOU SET US UP n
GET TO THE CHOPPER a
HERE IS MY INVITATION a
GET UP 1
YOU'RE FIRED n
HE HAD TO SPLIT 2
ENOUGH TALK
TALK TO THE HAND a
YOU HAVE BEEN TERMINATED

Try it online!

Pyt, 1 byte
△

Try it online!
Explanation:
               implicit input
 △             compute the nth triangle number

Can you give a link to the codepage?

It's at the beginning of the interpreter2 file - the language is still a work in progress

I just added a link to the codepage

1 byte

@cairdcoinheringaahing I never got around to editing all of my old answers once I made Pyt take input implicitly. I've edited some of them, but not all

brainfuck, 14 bytes
,[[>+<<.>-]>-]

Try it online!
Takes input as character code, outputs as unary null bytes

Go, 29 bytes
A function literal which uses the closed form, \$ \frac n2(n+1) \$.
func(n int)int{return-^n*n/2}

Try it online!

~ is not allowed outside of interfaces or type constraints. 31 bytes.

C# (Visual C# Interactive Compiler), 29 22 10 bytes
n=>n*++n/2

Try it online!

Spice (56 bytes)
;a;b;c;d@
REA a;
ADD a 1 b;
DIV b 2 c;
MUL a c d;
OUT d;

Explanation
The code is an implementation of the n*(n+1)/2 solution seen in other responses. It should be fairly readable but here's the code annotated:
;a;b;c;d@    - Declare 4 vars a, b, c and d (@ marks end of declarations)
REA a;       - Read in the value from the console and store in a
ADD a 1 b;   - Add 1 to a and store in b
DIV b 2 c;   - Divide b by 2 and store in c
MUL a c d;   - Mulitply a and c and store in d
OUT d;       - Output d to console

C (gcc), 19 bytes
#define f(n)n*-~n/2

Try it online!
C (gcc), 15 bytes
f(n){n*=-~n/2;}

-5 bytes thanks to ceilingcat!
Try it online!

@ceilingcat Huh. How does that work?

@JL2210 It's abusing the way GCC compiles the code without optimizations.

1+2+3+4+5+6=18?

as stated by @l4m2, the second solution doesn't work for even values of n, this can be fixed by implicitly casting to double for +1 byte: f(n){n*=-~n/2.;}

Hexagony, 16 bytes
?"&{2'<)}=*/@!:=

Try it online!
Try it online differently!

You can get 15 pretty trivially by using chr(2). Try it online!

@JoKing wow, I didn't even know that was a command, good find

It's a sort of accidental extension to the "All Letters set the edge to their ordinal value" rule, in that any non-instruction non-whitespace character sets its ordinal value, even unicode characters!

wait really? I feel a bit dumb now, and that opens up more possibilities

Knight, 11 bytes
O/*+1=xPx 2

Try it online!
Ungolfed:
OUTPUT / (* (+1 = x PROMPT) x) 2

How the magic works:
This is using the fact that \$\sum_{n=1}^{x} n == \frac{x(x + 1)}{2}\$

=xP First, we read a line from standard input and assign to x. Normally, we would do +0P to immediately coerce it to a Number, but I have better plans.
+1=xP We add the result of the assignment to \$1\$. This coerces to Number for us, giving a result of Number.
*+1=xPx We then multiply that by x. Since +1=xP is a Number, x will also be converted to a Number. Now, we have \$x(x + 1)\$.
Last, divide by 2 and output.

Fourier, 9 bytes
I~_^*_/2o

Try it online!

flax, 2 bytes
Σκ

Try It Online!
Explanation
Σκ
Σ     ⍝ sum of
 κ    ⍝ numbers from range 1...n

MSWLogo, 26 bytes
to f :n
pr :n*(:n+1)/2
end

Vyxal Rs, 0 bytes

Try it Online!
Lol

Regex  (Perl / Raku / PCRE), 2 bytes
x+

Takes its input in unary, as a string of x characters whose length represents the number. Returns its output as the number of ways the regex can match.
Try it online! - Perl v5.28.2 / Attempt This Online! - Perl v5.36+
Try it online! - Raku
Try it online! - PCRE1
Try it online! - PCRE2 v10.33 /
Attempt This Online! - PCRE2 v10.40+
Although Perl, Raku, and PCRE2 are the only regex engines currently capable of counting the number of possible matches without their source code being patched, this solution itself obviously only uses the most basic regex functionality, universal to all regex engines.
x+ will match every possible non-empty substring exactly once. So for example with the input 5, it is converted to unary as xxxxx, and then the list of possible matches is the following set of substrings:
xxxxx, xxxx, xxx, xx, x
xxxx, xxx, xx, x
xxx, xx, x
xx, x
x
As such, counting these is equivalent to calculating the sum of all integers from \$1\$ to \$n\$ (a.k.a. the \$n\$th triangular number).
This can be extended in many interesting ways, for example raising numbers to a constant power.
Retina 1.0, 9 bytes
.+
*
w`.+

Input and output are both in decimal.
Try it online!
Explanation:
.+
*

Convert the input from decimal to unary, with _ as the repeating character.
w`.+

w enables full overlap mode, where all substrings are considered (this feature was introduced in Retina 1.0.0). .+ then matches the full set of non-empty substrings. Using .* instead, to match all substrings, would shift the sequence 1 forward: Try it online!
If the input were taken in unary, this solution would be 4 bytes: Try it online!
Retina is not capable of counting the number of ways a regex can match, only the number of unique substrings that match, so this method can't be directly extended any further than the triangular number sequence.

Are there any other interesting sequences not exceeding n(n+1)/2 that could be calculated by Retina 1 in this way?

Presumably constant exponentials would be just a case of e.g ^(.|.|.)*$ for 3ⁿ. How about Fibonacci numbers, does something like ^(.|..)*$ work?

@Neil The maximum for Retina 1.0's w is (n+1)(n+2)/2 which is reached by .* (there are n+1 empty substrings). Not sure if there are any other interesting sequences this would work for.

@Neil Fibonacci is what kicked off this idea for me :-) and I even originally used ^(.|..)*$ for it instead of ^(..?)*$.

@Neil Nice way of doing $k^n$. I hadn't even started thinking about that yet. I guess ^(.(||))*$ would golf it better for $k>3$.

@Neil BTW, $2^n$ is simply ^(.+)* which is shorter than ^(.|.)*$ and $3^n$ is ^((.+)*)+ which is shorter than ^(.|.|.)*$ – the general sequence gives $(2^k+1)^n$ but it's no longer the shortest after $5^n$.

I tried counting the matches of ^(.+)* against xxx and I can only find six - 1 of length 0, 1 of length 1, 2 of length 2 and 2 of length 3.

@Neil There are eight: |, x|, x|x|, x|x|x|, x|xx|, xx|, xx|x|, xxx|

Ah of course I forgot (.+) can have a different length each time, so you're counting in reversed binary - |, 1|, 01|, 1|1|, 001|, 1|01|, 01|1|, 1|1|1|.

BitCycle -u, 11 10 bytes
-1 byte thanks to Jo King
 ~\~!
?AB^

Try it here!
Explanation
In BitCycle, numbers are represented in unary (with the -u flag allowing I/O to be given in decimal form for convenience). Thus, all we need is this algorithm:

Input a number
Loop while the number is nonzero:

Output the current number
Decrement the current number

Outputting unary numbers consecutively has the effect of adding them, thus giving n + (n-1) + ... + 1.
The number (as a string of 1 bits) comes in at the source ? and goes into the collector A, which then dumps it into the collector B. When the bits exit B, they are directed north into the dupneg ~, where a copy turns right (east) and a negated copy turns left (west). The original copy goes into the sink ! to be output. From the negated copy, one bit is sent north by the splitter \ and discarded. The rest get negated again by a second dupneg; the doubly negated bits go south into the A collector to begin the loop again, while the other copies go north off the playfield and are discarded. Once no bits are left, the program halts and outputs the sink's contents.

awk, 18 bytes
jot 50 |

awk '$_*=$++_++/(_+_--)'

1
3
6
10
15
21
28
36
45
55
66
78
91
105

What does jot do here?

@pxeger : visually representing a sequentially incrementing integer counter …. the output was 50 rows long, each representing the sum up to that row #, but i trimmed it to 105 for readability. it's basically like seq but i like it more cuz it requires fewer invocations of the -f fmt flag

Japt -mx, 1 byte
Ä

Try it
Ä     :Implicit map of each U in the range [0,input)
Ä     :Add 1
      :Implicit output of sum of resulting array

Nibbles, 1 byte (2 nibbles)
+,

No builtin for sum-over-list or flags for summation or range, but Nibbles still seems pretty competitive here...
+       # sum of list:
 ,      # range from 1..
        # (implicit) input

shell, 17 14 bytes
First attempt was:
seq -s+ -t0 $1|bc

But not all implementations of seq know -t option.
Second attempt is:
seq -s+0 $1|bc

there is no -t option to seq(1), but seq -s+ 0 $1|bc or seq -s+ $1|bc works

mine knows -t but it seems that GNU/Linux and OpenBSD implementations doesn't. I suppose your implementation still terminates with new-line, cause here seq -s+ 5 yields 1+2+3+4+5+ which turns to "Parse error: bad expression" for bc

13 bytes bash solution from 2017..

I've missed that post @roblogic :( It has the same issue (my MacOS and my FreeBSD are resulting to the parse error)

Erlang 19 bytes
s(N) -> N*(N+1)/2.

NASM 32 bits, 719 bytes
I am learning Assembly and used this golf challenge as a context for learning. Probably not the best, but it works.
Note: This version can only take a digit as an input (1 byte character)
section .data
a: equ 1
section .bss
b: resb a
section .text
global _start
_start:
mov eax, 3
mov ebx, 0
mov ecx, b
mov edx, a
int 80H
cmp eax, -1
jz _exit_1
mov edi, eax
atoi:
mov eax, 0
mov ebx, 0
c:
movzx esi, byte [ecx]
cmp ebx, edi
je d
cmp esi, 48
jl _exit_1
cmp esi, 57
jg _exit_1
sub esi, 48
imul eax, 10
add eax, esi
inc ecx
inc ebx
jmp c
d:
mov ecx, eax
mov eax, 0
.count:
add eax, ecx
dec ecx
cmp ecx, 0
jne .count
print_uint32:
xor ebx, ebx
mov ecx, 10
push ecx
mov esi, esp
add esp, 4
.e:
inc ebx
xor edx, edx
div ecx
add edx, '0'
dec esi
mov [esi], dl
test eax, eax
jnz .e
mov edx, ebx
mov eax, 4
mov ebx, 1
mov ecx, esi
int 80h
_exit_0:
mov eax, 1
mov ebx, 0
int 80H
_exit_1:
mov eax, 1
mov ebx, 1
int 80H

Try it online (This is 32 bit assembly, it will not run on TIO's 64 bit assembly online compiler.)
You can find a "non factorized" and commented code here

You can remove the spaces after the commas.

PIC16F88x Machine Code, 5 words (70 bits)
A function that expects its input at address 0x70, and returns via register W.
70 bits can't be represented cleanly in hex, so here's the raw binary:
00 0001 0000 0000
00 0111 0111 0000
00 1011 1111 0000
10 1000 0000 0110
00 0000 0000 1000

This assumes the function is located at address 0x005. It would be the same length no matter where I put it, but I have to hardcode the GOTO destination.
In mpasm syntax:
    ORG 5         ; Linker directive: place the function at address 0x005
sum:
    CLRW          ; Zero the W register
sum_sub0:
    ADDWF 0x70,0  ; Add the value to W
    DECFSZ 0x70,1 ; Decrement the value, skipping the next instruction if it
                  ; reached zero
    GOTO sum_sub0 ; Loop
    RETURN        ; Return

The PIC16F88x have no multiply instruction, so I have to loop. It might be possible to do better if there's a clever bitwise way to avoid multiplication.

Fortran (GFortran), 35 28 bytes
Try it online!
read*,n;print*,n*(n+1)/2;end

Old (but kinda fun) solution: Construct inline anonymous array, sum, and print.
read*,n;print*,sum([(j,j=1,n)]);end

(,) i, 280 273 49 33 30 Chars or \$30\log_{256}(3)\approx\$ 5.94 Bytes
(,,((),(())(),,,(),,((()))()))

Massive golf (224 chars) by taking input in unary.
Another golf (16 Chars) by realizing that input length doesn’t have to be stored in a variable.
No longer taking input in unary!
TIO

bc, 9 bytes
n*(n+1)/2

Try it online!
Weird how some shell solutions call bc instead of just writing bc code.

Common Lisp, 26 bytes
(lambda(n)(/(+(* n n)n)2))

Hello, and welcome to the site!

Carrot, 9 bytes
#^F+1/2*$

Explanation:
#  //Set the string stack to the input
^  //Convert to operations mode
F  //Change to float stack
+1 //Add one to the stack
/2 //Divide the stack by 2
*$ //Multiply the stack by the input
   //Implicitly output the result

Java 8 (39 37 bytes)
n->{System.out.println((n*(n+1))/2);}

saved 2 bytes thanks to @TheLethalCoder. I now realise that I could also omit print statements etc, but there already is a Java answer that I missed, which would end up being pretty much the same thing. Thus I will leave it as this :-)
(Is this the right way of scoring Java? I have no clue if this is valid, I saw it in another answer but this actually omits quite a bit of the code necessary to actually run it..)
try it online

(n) can be just n. You can return from the lambda, I believe, instead of printing. And yes it's fine to compile to a lambda.

Side note: Use four spaces to format the code not back ticks.

@TheLethalCoder thanks! I just found another Java answer to this thread which indeed does it a great deal shorter and does not print ^^

MY, 4 bytes
Wow, MY is actually capable of something!
iΣ↵

Try it online!
Explanation (hex/cp):
1A/ - push input as an integer
49/i - pop a; push [1 .. a]
53/Σ - pop a; push sum(a)
27/↵ - pop a; print(a) (with newline)

Befunge, 9 bytes
&:1+*2/.@

Try it online!

Gaia, 2 bytes
+⊢

This is reduce ⊢ by addition +, which implicitly casts numbers to ranges beforehand.
You could also do ┅Σ (range ┅ and sum Σ), which is still 2 bytes.

Excel VBA, 14 Bytes
Anonymous VBE immediate window function that takes input from range [A1] and outputs to the VBE immediate window
?[A1*(A1+1)/2]

BLua, 32 bytes
r=0;for i=1,n r=r+i end;return r

Try it out (Vanilla Lua version, 53 bytes)
I'm not very good at this

CJam, 6 bytes
ri),:+

Try it online!
Explanation
ri    e# Read integer n
)     e# Add 1
,     e# Range from 0 to input argument minus 1
:+    e# Fold addition over array. Implicitly displa

Japt -x, 3 1 bytes
ò

Explanation:
ò     Range [0...Input]
-x    Sum

Try it online!

Add++, 15 9 bytes
D,f,@,Rb+

Try it online!
ಠ_ಠ I forgot about functions. And then I forgot about the range command
How it works
D,f,@,    - Create a monadic function called f (one argument)
      R   - Generate a range from 1 to n
       b+ - Reduce that range by addition (sum)

Braingolf, 1 byte
Q

Try it online!
1-indexed (ie 7 returns 0-6 summed)
Braingolf, 3 bytes
U&+

Try it online!
U - range, &+ - sum.

Clojure, 31 23 16 bytes
8 bytes saved thanks to @cliffroot
#(/(+(* % %)%)2)

Try it online!

AutoHotkey, 22 bytes
A(n){return n*(n+1)/2}

Defines a function that takes parameter n, and returns n*(n+1)/2, which is the nth triangle number, as shown in Leo's Husk answer.

Are you sure about the - operator?

@OlivierGrégoire Sure that it's the subtraction operator? I'm as sure as the AHK docs are

Okay, it's just seems weird given that 1+...+n is usually equals to n*(n+1)/2 in maths, not n*(n-1)/2, but I don't know AutoHotkey and how it does maths, so I had to ask.

@OlivierGrégoire Oh right yeah no I'm a turd that's supposed to be a +

Swift, 13 bytes
Anonymous function:
{$0*($0+1)/2}

You can call it like this:
print({$0*($0+1)/2}(5))

Try it online!

Mathematica, 9 bytes
#(#+1)/2&

or, at 11 bytes,
Tr@Range@#&

Java, 10 bytes
n->n*-~n/2

Admittedly, only slightly different from another Java answer, but uses two's complement trickery.

ArnoldC, 461 bytes
IT'S SHOWTIME
HEY CHRISTMAS TREE I
YOU SET US UP 0
GET YOUR ASS TO MARS I
DO IT NOW
I WANT TO ASK YOU A BUNCH OF QUESTIONS AND I WANT TO HAVE THEM ANSWERED IMMEDIATELY
HEY CHRISTMAS TREE Z
YOU SET US UP I
GET TO THE CHOPPER I
HERE IS MY INVITATION I
GET UP 1
ENOUGH TALK
GET TO THE CHOPPER Z
HERE IS MY INVITATION Z
YOU'RE FIRED I
ENOUGH TALK
GET TO THE CHOPPER Z
HERE IS MY INVITATION Z
HE HAD TO SPLIT 2
ENOUGH TALK
TALK TO THE HAND Z
YOU HAVE BEEN TERMINATED

Explanation
Schwarzy.
Try it online!

Kona - 8 bytes
{+/!x+1}

Explanation:
 +/      Add together
   !      All numbers less than...
    x+1   The input plus 1

Alternative answer - 8 bytes:
{+/x,!x}

 +/      Add together
   x      The input
    ,     Joined to
     !     All the numbers less than...
      x    The input

If you dont need it to be a function you can do +/!1+ for 5 bytes.

If a function is required, in most k's you can do {x+/!x} for 7 bytes.

Emojicode, 50 bytes
➡➗✖➕1 2

Try it online!

Ly, 26 7 bytes
n:1+*2/u

EDIT: Saved a bunch of bytes by using a far better algorithm.

4, 40 bytes
3.70060101002000120300026040230503045054

Try it online!

Tcl, 27 bytes
proc T n {expr $n*($n+1)/2}

Try it online!

Casio Basic, 9 bytes
(n+1)n/2

8 bytes for the code, +1 to add n as parameter.

Factor, 12 bytes
[ iota sum ]

Input is given as an argument to this anonymous function (quotation).

Terrapin Logo, 16 bytes
OP (1+:N)*(:N/2)

GolfScript, 7 6 bytes
~.)2/*

Try it online!

Commentator, 22 bytes
//
;-} {-
 {-  -}<!-}!

Try it online!

><>, 20 15 bytes
:1-:?!v
n?=1l+<

@notatree saved me a couple bytes!
Try it online!

Nice! You can save a byte by turning the second line into v?=1l+<, or if you don't mind exiting with an error, replace the second line with n?=1l+< and remove the last two lines.

Pip, 7 bytes
a*++a/2

Try it online!

Cubically, 19 bytes
R3U1F1$:1/1+7*7/0%6

How it works:
R3U1F1              Set the top face to 2
      $             Get the first input as a number
       :1/1+7       Set the notepad to the input + 1
             *7     Multiply the notepad by the input
               /0   Divide the notepad by 2
                 %6 Output the notepad as a number

Recursiva, 3 bytes
sBa

Try it online!
Recursiva, 5 bytes
H*a;a

Try it online!
Recursive solution:
Recursiva, 12 bytes
=a0:0!+a#~a$

Try it online!

,,,, 6 bytes
::×+2÷

Try it online!
Explanation:
::     Duplicates the input twice
  ×    Pops off top two values and muliples them
   +   Adds the two values together. (Thus far it's basically n*n+n)
    2÷ Divides by 2

Pyth, 11 9 bytes
VQ=+ZhN)Z

Explanation:
VQ       For N in range(0, Input)
=+ZhN)   Set Z to Z + 1 + N, suppress output and close function call
Z        Output Z

Try it online!

Beat you by 7 bytes

@Tornado547 I know, but that answers been taken. This is just a unique way of doing it. 2 bytes: sS.

Python 3, 35 bytes
print(sum(range(1,int(input())+1)))

You can save 2 bytes by removing the 1, in the range argument. Try it online!

C (gcc) 16 bytes
f(n){n=n*-~n/2;}

Try it online

Would it be possible to use n*=...?

@Zacharý that gives the wrong output for some input

Whoops, forgot about order of operation

Alumin, 9 bytes
jqdhcpfaf

Try it online!
Explanation
jqdhcpfaf
j          numeric input
 q   p     whlie TOS > 0
  d        duplicate TOS
   hc      subtract 1
      f f  fold over...
       a   ... addition

@Riker shoot lol done

SNOBOL4 (CSNOBOL4), 62 40 38 bytes
 N =INPUT
 OUTPUT =N * (N + 1) / 2
END

Try it online!

Pyth - 2 Bytes
sS

Explanation:
sSQ Q added implicitly to resolve arity
s   sum of
 S  integers from one to
  Q input

Kotlin, 13 bytes
{it*(it+1)/2}

Beautified
{
    it * (it + 1) / 2
}

Test
var f: (Int) -> Unit =
{it*(it+1)/2}

fun main(args: Array<String>) {
    println(f(5))
}

TIO
TryItOnline

Ahead, 6 bytes
IEK+O@

Try it online!

Phooey, 10 bytes
&.@+1*/2$i

Try it online!
Explanation
&.@+1*/2$i
&.            write input to the tape
  @           push same input to the stack
   +1         increment tape value
     *        multiply tape value by popped stack value
      /2      divide it by 2
        $i    output as integer

Whitespace, 71 bytes
[S S S N
_Push_0][S N
S _Duplicate_0][T   N
T   T   _Read_STDIN_as_integer][T   T   T   _Retrieve][S N
S _Duplicate][N
S S N
_Create_Label_LOOP][S N
T   _Swap][S S S T  N
_Push_1][T  S S T   _Subtract][S N
S _Duplicate][N
T   S S N
_If_0_Jump_to_Label_PRINT_AND_EXIT][S N
S _Duplicate][S T   S S T   S N
_Copy_2nd][T    S S S _Add][N
S N
N
_Jump_to_Label_LOOP][N
S S S N
_Create_Label_PRINT_AND_EXIT][S N
N
_Discard_top][T N
S T _Print_as_integer]

Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.
Try it online (with raw spaces, tabs and new-lines only).
Example run: input = 3
Command   Explanation                     Stack        Heap   STDIN  STDOUT  STDERR

SSSN      Push 0                          [0]
SNS       Duplicate 0                     [0,0]
TNTT      Read STDIN as integer           [0]          {0:3}  3
TTT       Retrieve input from heap 0      [3]          {0:3}
SNS       Duplicate 3                     [3,3]        {0:3}
NSSN      Create Label_LOOP               [3,3]        {0:3}
 SNT      Swap top two                    [3,3]        {0:3}
 SSSTN    Push 1                          [3,3,1]      {0:3}
 TSST     Subtract (3-1)                  [3,2]        {0:3}
 SNS      Duplicate 2                     [3,2,2]      {0:3}
 NTSSN    If 0: Jump to Label_EXIT        [3,2]        {0:3}
 SNS      Duplicate 2                     [3,2,2]      {0:3}
 STSSTSN  Copy (0-indexed) 2nd (3)        [3,2,2,3]    {0:3}
 TSSS     Add (2+3)                       [3,2,5]      {0:3}
 NSNN     Jump to Label_LOOP              [3,2,5]      {0:3}

 SNT      Swap top two                    [3,5,2]      {0:3}
 SSSTN    Push 1                          [3,5,2,1]    {0:3}
 TSST     Subtract (2-1)                  [3,5,1]      {0:3}
 SNS      Duplicate 1                     [3,5,1,1]    {0:3}
 NTSSN    If 0: Jump to Label_EXIT        [3,5,1]      {0:3}
 SNS      Duplicate 1                     [3,5,1,1]    {0:3}
 STSSTSN  Copy (0-indexed) 2nd (5)        [3,5,1,1,5]  {0:3}
 TSSS     Add (1+5)                       [3,5,1,6]    {0:3}
 NSNN     Jump to Label_LOOP              [3,5,1,6]    {0:3}

 SNT      Swap top two                    [3,5,6,1]    {0:3}
 SSSTN    Push 1                          [3,5,6,1,1]  {0:3}
 TSST     Subtract (1-1)                  [3,5,6,0]    {0:3}
 SNS      Duplicate 0                     [3,5,6,0,0]  {0:3}
 NTSSN    If 0: Jump to Label_EXIT        [3,5,6,0]    {0:3}
NSSSN     Create Label_EXIT               [3,5,6,0]    {0:3}
 SNS      Discard top                     [3,5,6]      {0:3}
 TNST     Print top (6) to STDOUT as int  [3,5]        {0:3}         6
                                                                              error

Program stops with an error: No exit found. (Although I could add three trailing newlines NNN to get rid of that error.)

@yBASIC, 10 bytes
?_*_+_>>!.

Input should be in _ (No input methods exist)
Explanation
N(N+1) can be rewritten as N*N+N. Dividing by 2 would then require parentheses, but a left shift can be used instead. !. is the same as !0.0 (logical not of 0), which is 1.

MathGolf, 2 bytes
╒Σ

Try it online!
Pretty much exactly the sum (Σ) of the range from 1 to input (╒)

Keg, 2 bytes (SBCS)
Ï⅀

TIO
Keg, 5 bytes (SBCS)
Ï∑+).

Explanation:
Ï#    Range from input to 0. The 0 will not affect the summation.
 ∑+#  Apply all stack: add.
   )# We have to complete the braces if we want to output as an integer.
    .#Output as an integer

TIO

That's available on the github interpreter and theoretically, it should work.

-1 byte using the -hr flag

Gol><>, 7 bytes
I:P*2,h

Courtesy of JoKing
Try it online!
8 bytes
I::*+2,h

Try it online!

Clojure - 19 bytes
#(apply +(range %))
Boring answer is boring...

Symbolic Python, 14 bytes
_*=-~_*_/(_+_)

Try it online!
This basically evaluates to \$ \frac{ n^2 (n-1)}{2n} = \frac{ n (n-1)}{2}\$, which is the usual form for triangular numbers.

Shakespeare Programming Language, 154 bytes
(Whitespace added for readability)
S.Ajax,.Puck,.Act I:.Scene I:.[Enter Ajax and Puck]
Ajax:
Listen tothy.
You is the quotient betweenthe product ofyou the sum ofyou a cat a big cat.
Open heart

Try it online!
Simple, just does n(n+1)/2.

Charcoal, 5 bytes
ＩΣ…·Ｎ

Try it online!
Explanation:
 Σ        The sum of
  …·Ｎ     the inclusive range from 0 to input
Ｉ          converted to a string

I tried to make it with the formula \$\frac{x(x+1)}{2}\$ but it took more characters.

Rust, 12 bytes
|n|n*(n+1)/2

Try it online!
Anonymous function.

Labyrinth, 8 bytes
?:)*_2/!

Try it online!
A linear program which halts by error at the bounced-off / (triggering division by zero).
?:)*  Push input, dup, increment, multiply (giving n*(n+1))
_2/   Divide by 2
!     Pop and print, bounce off the dead end
/     The top is (implicit) 0 so it triggers division by zero error

MAWP, 8 bytes
@!1+*2$:

Try it!
Old solution that manually loops through integers:
MAWP, 13 bytes
`0@[!\+/1-]`:

Try it!

MashedPotatoes, 144 bytes
synchronized
(0.0f){casestd::ignoreof{_->usestrictqw/nullptr/;}goto++i;(formatt"WHILE$ARGV<$[SETLOCAL*read-eval*WEND")procFS{`uniq-c`}{s/()//g}}

MashedPotatoes isn't available on TIO, so here's the Esolangs page for reference.
https://esolangs.org/wiki/MashedPotatoes
The annotated code below might not make sense without reading about the quirky language syntax first, but here goes...
synchronized
(0.0f) {

Sets the value of Label0 to 2 (the line number where the ( appears.  Important for register rotation expression later.
case std::ignore of { _ -> use strict qw/nullptr/; }

Read an integer from STDIN into register ^A.
goto ++i;

Shift the registers, meaning ^A -> ^C -> ^E, to move the input to ^C.
(format t "

Loops while the contents of ^C are greater than 0.
WHILE $ARGV < $[ SETLOCAL *read-eval* WEND

Adds the value of ^C to register ^E.
")

End of loop, automatically decrements ^C.
proc FS {`uniq -c`} { s/()//g }

Prints the contents of ^E.
}
Just closing the synchronized statement to end the program cleanly

<>^v, 8 bytes
,≈)*2?/;

Explanation
,≈)*2?/;

,         Read number from stdin
 ≈        Duplicate top of stack
  )       Increment top of stack
   *      Multiply top element of stack by second element of stack
    2     Push 2
     ?    Swap top two elements of stack
      /   Divide top element of stack by second element of stack
       ;  Print top of stack

run online

Python 3, 26 bytes
lambda n:sum(range(1,n+1))

Try it online!
Bewildered this isn't here yet.

It isn't here because it's much longer than the optimal lambda n:n*-~n/2

I've posted an alternative 19-byter, but it's not as short as @pxeger's solution

APOL, 18 bytes
v(0);ⅎ(⧣ ∆(0 ∈));⁰

Python 3, 32 19 bytes
lambda z:z*(z+1)//2

-13 bytes because lambdas are small
-6 bytes due to a rereading.
-2 bytes thanks to @oeuf

-2 bytes

I see. Is the newline counted?

@py3programmer yes

ok then, so i've updated it

Factor + math.unicode, 12 bytes
[ [1,b] Σ ]

Try it online!
Posting this here because the other Factor answer is incorrect.

J-uby, 7 bytes
:+|:sum

Try it online!

Desmos, 13 bytes
f(n)=.5nn+.5n

Very surprised that there wasn't a Desmos answer here yet.
Try It On Desmos!

Mornington Crescent, 1136 bytes
I was surprised not to find an answer here already -- I thought we MC programmers had scoured the simpler challenges pretty clean.
Take Northern Line to Bank
Take Circle Line to Bank
Take District Line to Parsons Green
Take District Line to Bank
Take Circle Line to Hammersmith
Take Circle Line to Notting Hill Gate
Take Circle Line to Notting Hill Gate
Take Circle Line to Aldgate
Take Circle Line to Aldgate
Take Metropolitan Line to Chalfont & Latimer
Take Metropolitan Line to Aldgate
Take Circle Line to Hammersmith
Take Circle Line to Aldgate
Take Circle Line to Aldgate
Take Metropolitan Line to Chalfont & Latimer
Take Metropolitan Line to Aldgate
Take Circle Line to Aldgate
Take Circle Line to Victoria
Take Circle Line to Hammersmith
Take Circle Line to Cannon Street
Take Circle Line to Hammersmith
Take Circle Line to Cannon Street
Take Circle Line to Bank
Take Circle Line to Victoria
Take District Line to Turnham Green
Take District Line to Hammersmith
Take District Line to Turnham Green
Take District Line to Notting Hill Gate
Take Circle Line to Notting Hill Gate
Take District Line to Upminster
Take District Line to Bank
Take District Line to Upminster
Take District Line to Bank
Take Circle Line to Bank
Take Northern Line to Mornington Crescent

Try it online!
Summary of the program:
1. Parse integer from string using Parsons Green and store in Bank
(as far as I know, MC only supports string input)
2. Find bitwise negation of integer using Notting Hill Gate
3. Multiply integer by its bitwise negation using Chalfont & Latimer and store in Victoria
4. Calculate 1 by dividing the input integer by itself using Cannon Street
5. Retrieve stored value from Victoria and bitwise shift right by 1 using Turnham Green
6. Find bitwise negation of result using Notting Hill Gate
7. Add 1 to result using Upminster
8. Output the result via Mornington Crescent

Prolog (SWI), 18 bytes
N+R:-R is\N* -N/2.

Try it online!
Simple application of the formula

Thunno +, 2 bytes
(actually \$ 2 \log_{256}(96) \approx \$ 1.65 bytes but that doesn't show up on the leaderboard)
RS

Attempt This Online!
Thunno, \$ 4 \log_{256}(96) \approx \$ 3.29 bytes
R1+S

Attempt This Online!
or
1+RS

Attempt This Online!
Explanations
RS  # Implicit input
    # The + flag pushes input+1
R   # Push range(0, input+1)
 S  # Sum this list
    # Implicit output

R1+S  # Implicit input
R     # Push range(0, input)
 1+   # Add one to each
   S  # Sum this list
      # Implicit output

1+RS  # Implicit input
1+    # Add one to the input
  R   # Push range(0, input+1)
   S  # Sum this list
      # Implicit output

PowerShell, 22 bytes
1.."$args"-join'+'|iex

Try it online!

You need to use an argument, hard-coding the input is not a valid approach. Here are some options: 1.."$args"-join'+'|iex or param($a)1..$a-join'+'|iex or 1.."$input"-join'+'|iex

TacO, 8 bytes
@+%i
  i

A very simple solution. Iterates from 1 to the first argument, returning the index at each step, then sums the stack. Implicitly output.
@    ; Program Entry
+    ; Sum the result of
 %i  ; Loop from 1 to input
  i  ; Passed value of the loop

Try it online!

Thunno 2 S, 1 byte
R

Attempt This Online!
Thunno 2, 2 bytes
RS

Attempt This Online!
Pretty simple.

Vyxal Rs, 0 bytes
Or 2 bytes depending on whether you count the flags here.

Try it Online!
Vyxal has useful flags.

btw: https://codegolf.stackexchange.com/a/248138 (no need to delete)

@naffetS I knew there would be a duplicate!

Ly, 3 bytes
R&+

Try it online!
A literal interpretation of the contest here...
R    - generate a range of numbers from 0 to "N" (from STDIN)
 &+  - sum the stack
     - print the stack as numeric values by default

Swift, 39 28 bytes
var s={(1...$0).reduce(0,+)}

Fairly self-explanatory.

Uiua, 15 bytes
/+⇡+1parse&sc

Folds an array from 0 to the input number parsed as an integer.
Uiua Pad

Scratch, 31 bytes
Try it here
define(n
say(((n)*((n)+(1)))/(2

Scala, 12 bytes
Gauss sum (12 bytes):
n=>n*(n+1)/2

Naive version (14 bytes):
n=>1.to(n).sum

Clojure, 28 bytes
#(apply + (range 1 (inc %)))

JavaScript (Node.js), 12 bytes
n=>(n*n+n)/2

Try it online!

-2 bytes: n=>n*--n/2

Could you elaborate? :-)

n=>n*++n/2 is the same thing as n=>n*(n+1)/2, while also changing the value of n. Since we don't need n anymore, this doesn't matter. (n=>n*--n/2 is incorrect due to a typo)

Clojure, 16 bytes
#(/(*(inc %)%)2)

Groovy, 11 bytes
{it*++it/2}

Try it online!

The input is not modified by rules of Groovy clsures.

PHP, 35 34 32 25 bytes
<?=$argv[1]*++$argv[1]/2;

Run from the command line, with the input as a parameter.

Save 6 bytes with $argn and -F

Fortran 95, 58 bytes
function l(n)
i=1
l=1
do while(i<n)
i=i+1
l=l+i
end do
end

Try it online!

Dyvil, 12 bytes
n=>n*(n+1)/2

The operator rules force me to use either parentheses or spaces.
Uses the Gauss method, and is also a Scala polyglot.
Usage:
let f: int -> int = n=>n*(n+1)/2

print f(5)  // 15
print f(10) // 45

Swift 3, 60 Bytes
var b=Int.init(readLine()!)!
(1..n
(n*n+n)/2

Tcl, 36 bytes
time {incr s [incr n]} $argv;puts $s

Try it online!

Tcl, 29 bytes
puts [expr $argv*($argv+1)/2]

Try it online!

If you've got two Tcl answers, you should probably put them in one answer.

@numbermaniac I have three.

Ah. It's probably better to put them all in one answer, then.

QBIC, 10 bytes
?(:+1)/2*a

This prints (input+1) divided by 2 times input. Looping through all numbers from 1 to n is one byte longer:
[:|p=p+a]?p

Pyke, 2 bytes
Ss

Try it online!
Showing off Pyke's roots in being inspired by Pyth, the function map is exactly the same, only ran as a stack rather than a tree.
S  -  range(1, input+1)
 s - sum(^)

Matlab/Octave, 12 bytes
@(n)sum(1:n)

Perl 5, 11 bytes
10 bytes of code + 1 for -p

$_*=$_++/2

Try it online!

Implicit, 2 bytes
¡Þ

Try it online!
    implicit integer input
¡   push 1..n
 Þ  add stack together
    implicit integer output

Version without builtins:
Implicit, 13 12 bytes
(:-1)[(]+[)]

The popping of 0 is unnecessary due to updates. Old version:
(:-1);[(]+[)]

Try it online! Explanation:
(:-1);[(]+[)]
(...)           do..while top of stack truthy
 :               duplicate (implicit input if stack empty)
  -1             subtract 1 from top of stack
     ;          pop the last value (will be 0)
      [         pop stack into memory
       (...)    do..while top of stack truthy
        ]       pull memory
         +      add top two stack values together
          [     pop into memory
                implicit output

Ok, so that's a bit confusing. (I don't really know how it works myself). Let's go step-by-step for the input 5.
(:-1);[(]+[)]
(...)
 :-1            stack: 5, 4
 :-1            stack: 5, 4, 3
 :-1            stack: 5, 4, 3, 2
 :-1            stack: 5, 4, 3, 2, 1
 :-1            stack: 5, 4, 3, 2, 1, 0
     ;          stack: 5, 4, 3, 2, 1
      [         stack: 5, 4, 3, 2
       (...)
        ]       stack: 5, 4, 3, 2, 1
         +      stack: 5, 4, 3, 3
          [     stack: 5, 4, 3
        ]       stack: 5, 4, 3, 3
         +      stack: 5, 4, 6
          [     stack: 5, 4
        ]       stack: 5, 4, 6
         +      stack: 5, 10
          [     stack: 5
        ]       stack: 5, 10
         +      stack: 15
          [     stack: empty (exits loop)
             ]  stack: 15
                implicit output

Pushy, 3 bytes
RS#

Try it online!
How it works
    - Implicit input on the stack e.g. 5;    STACK = [5]
R   - Generate a range from 1 to n;          STACK = [1 2 3 4 5]
 S  - Sum the stack;                         STACK = [15]
  # - Output top of the stack as an integer; DISPLAY 15

Wow, someone other than me used Pushy! Quick correction: R generates from 1 to n, not 0 to n.

@FlipTack ah, thanks! The docs are a little confusing with X and R

Also, summing does not remove the items it is summing, so the stack finishes as [1,2,3,4,5,15]

Aceto, 9 bytes
ridIU2:*p

ri reads input and converts to int
d duplicates the value
I increments the top value by one
U reverses the stack
2: divides by 2
* multiplies the top two values
p prints it

Try it online!

COBOL (GNU), 164 bytes
Requires the -F flag (+2 bytes)
Uses the formula N*(N+1)/2
IDENTIFICATION DIVISION.PROGRAM-ID.S.DATA DIVISION.WORKING-STORAGE SECTION.
01 N PIC 9(9) VALUE ZEROES.PROCEDURE DIVISION.ACCEPT N.COMPUTE N=N*(N+ 1)/2.DISPLAY N.

Try it online!
Ungolfed:
       IDENTIFICATION DIVISION.
       PROGRAM-ID. S.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 N	PIC 9(5) VALUE ZEROES.
       01 R	PIC 9(9) VALUE ZEROES.

       PROCEDURE DIVISION.
       ACCEPT N
       COMPUTE R=N*(N+ 1)/2
       DISPLAY R.

COBOL (GNU), 362 bytes
Explicitly computing the sum
       IDENTIFICATION DIVISION.
       PROGRAM-ID. S.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 N	PIC 9(5) VALUE ZEROES.
       01 T	PIC 9(5) VALUE ZEROES.
       01 R	PIC 9(9) VALUE ZEROES.

       PROCEDURE DIVISION.
       ACCEPT N.
       PERFORM VARYING T FROM 1 BY 1 UNTIL T > N
       ADD T TO R
       END-PERFORM.
       DISPLAY R.

Try it online!
Because COBOL uses fixed-size variables, both of these work for values of n up to 44720. Anything larger doesn't fit in the specified 9 decimal digits of the result, although that is easily resolved by changing PIC 9(9) to PIC 9(10).

Windows batch, 57 21 bytes
Inspired by J42161217
@cmd/cset/a%1*(%1+1)/2

Functoid, 29 bytes
Most likely the characters $.@ don't count to the total, but this isn't going to win anyway..
Y(BBxZK0(BBB(C(BBS))CB[+))$.@

Try it online!
Explanation
Y(                       )     # find fixpoint of the function
  x                            # single argument recursive helper with
   Z                           #   - base case (== 0)
    (K0)                       #   - in base case: constant 0
        (BBB(C(BBS))CB[+)      #   - recursive function ( add (+) argument to recursive call of argument decremented by 1 ([) )
                          $    # apply argument
                           .   # simplify & print as Church numeral
                            @  # exit

The massive combinator BBB(C(BBS))CB is possibly still golfable, I'm still learning how to golf lambda calculus combinators and I find it rather tricky..

Broccoli, 35, 33 bytes
(fn t ($n) (/ (* $n (+ 1 $n)) 2))

Defines a function 't' that can be called like so:
(t 10)

Surely n*(n+1)/2 should be shorter, even in this ridiculous language

@Mego Surprisingly, not by very much. And it outputs it as a float, not an int. I hope that's OK.

I don't see why outputting as a float wouldn't be valid. There's a JS answer already.

(fn t($n)(/(* $n(+ 1 $n))2)) works too

Pyt, 2 bytes
řƩ

Try it online!

implicit input
ř returns [1, 2, 3, ... , top value]
Ʃ sums top value
implicit output
golfed by mudkip

Clean, 26 bytes
import StdEnv
$n=sum[1..n]

Try it online!
And also
Clean, 26 bytes
import StdEnv
$n=n*(n+1)/2

Try it online!

Aheui (esotope), 33 bytes
방빠받반타다따반나망해

Try it online!

Tidy, 13 bytes
{a:[1,a]|sum}

Try it online!
Explanation
{a:[1,a]|sum}
{a:         }    lambda with parameter `a`
   [1,a]         range from 1 to a
        |sum     sum

Same byte count: {n:n*(n+1)/2}

Attache, 8 bytes
Sum@1&`:

Try it online!
Explanation
This is a composition of two functions: Sum and 1&`:. First, 1&`: is a range from 1 to the input; Sum then sums the elements.

Tir, 4 bytes
{∟+}

Try it online!
Explanation
{∟+}    a block
 ∟      range from 1 to the input
  +     sum that range

Fynyl, 5 bytes
{rf+}

Try it online!
Explanation
{rf+}    block
 r       range from 1 to input
  f+     fold addition (sum)

Somme, 6 bytes
n:i*G.

Try it online!
Explanation
n:i*G.
n         numeric input      [n]
 :        duplicate          [n, n]
  i       increment          [n, n+1]
   *      product            [n(n+1)]
    G     halve              [n(n+1)/2]
     .    output             []

;#+, 19 bytes
*;(~;~*;)-~(~+~;)+p

Try it online!
Takes input in unary, outputs in decimal.
*;(~;~*;)-~(~+~;)+p
*;                     read 1 byte of input and increment it (check EOF)
   ~;~                 increment the secondary accumulator
  (   *;)              ...while there is still input
         -             set delta value to -1 (subtraction)
                           the state is now (0, N, -)
          ~(~ ~;)      for each character read
             +         subtract N from the secondary accumulator
                           (N decreases with each iteration)
                           the state is now (0, -sum, -)
                 +     subtracts sum from accumulator (0 - (-sum) = 0 + sum = sum)
                  p    print that value

D, 28 bytes
N f(N)(N n){return n*-~n/2;}

Try it online!
Alternatively, 61 bytes: import std.range;N f(N)(N n){return std.range.iota(n).sum+n;}

DScript, 28 bytes
N f(N)(N n){return n*-~n/2;}

Try it online!
Alternatively, 34 bytes: N f(N)(N n){return iota(n).sum+n;}

Runic Enchantments, 8 bytes
i:1+*2,@

Try it online!
Nothing exciting here, reads input multiplies it with itself+1, divides by 2, and outputs.
Kind of feel that I should have anticipated this sort of 1-input-1-output mathematical operation and made a MathFunc (A) operation for it ("its factorial, but addition!"), but I didn't.

W, 2 bytes
+R

Explanation
   % Implicit range from 1 .. input
+R % Reduce the array via addition

Z80Golf, 11 bytes
00000000: cd03 8047 af80 0520 fcff 76              ...G... ..v

Try it online!
I/O as byte values, takes a byte, outputs a byte. Assembly:
    call $8003
    ld b, a
    xor a
loop:
    add a, b
    dec b
    jr nz, loop
    rst $38
    halt

Z80Golf, 13 bytes
00000000: cd03 805f 193d 20fb 7dff 7cff 76         ..._.= .}.|.v

Try it online!
I/O as byte values, takes a byte, outputs two bytes little endian. Assembly:
    call $8003
loop:
    ld e, a
    add hl, de
    dec a
    jr nz, loop
    ld a, l
    rst $38
    ld a, h
    rst $38
    halt

Z80Golf, 54 bytes
00000000: cd03 8038 0ed6 3029 e5d1 2929 195f 1600  ...8..0)..))._..
00000010: 1918 ede5 d11b 197b b220 facd 1f00 7611  .......{. ....v.
00000020: 0000 01f6 ff09 3003 1318 faeb d57d b4c4  ......0......}..
00000030: 1f00 d17b c63a                           ...{.:

Try it online!
Proper, decimal I/O. Uses a recursive output routine, with a particularly clever 0-byte tailcall:
get_input:
    call $8003
    jr c, got_input
    sub a, '0'
    add hl, hl
    push hl
    pop de
    add hl, hl
    add hl, hl
    add hl, de
    ld e, a
    ld d, 0
    add hl, de
    jr get_input

got_input:
    push hl
    pop de
loop:
    dec de
    add hl, de
    ld a, e
    or a, d
    jr nz, loop

    call output
    halt

; Input:
; HL = number to print
output:
    ld de, 0 ; quotient
    ld bc, -10
div_loop:
    add hl, bc
    jr nc, neg
    inc de
    jr div_loop
neg:
    ex de, hl
    ; now: hl = quotient, de = remainder - 10
    push de
    ld a, l
    or h
    call nz, output
    pop de
    ld a, e
    add '0' + 10
    ; fallthrough to $8000 where the output hook is

Everything assembled with WLA-DX. The -b flag was passed to wlalink, and the following memory map was used:
.ROMBANKMAP
    BANKSTOTAL 1
    BANKSIZE $10000
    BANKS 1
.ENDRO

.MEMORYMAP
    DEFAULTSLOT 0
    SLOTSIZE $10000
    SLOT 0 $0000
.ENDME

Rockstar, 39 bytes
listen to N
cast N
let N be*N+1
say N/2

Try it here (Code will need to be pasted in)

Arn, 3 bytes
+\~

Try it!
+\ -> Fold with sum
~ -> One-range to
_ -> Input; implied

Bound, 3 bytes
i&n

Explanation:
i # Gets input and puts it onto the stack if its an int
& # Pops the top element, and puts the range of 1 to n on the stack
n # Sums all ints in the stack

Try it online!

MMIX, 28 bytes (7 instructions)
(a function)
23FF0001 1A0000FF 3F000001 FEFF0003
3BFFFF3F C00000FF F8010000

Dissassembly:
    ADDU $255,$0,1      // tmp = n + 1
    MULU $0,$0,$255     // rH:n = n * tmp
    SRU  $0,$0,1        // n >>>= 1
    GET  $255,rH        // tmp = rH
    SLU  $255,$255,63   // tmp <<= 63
    OR   $0,$0,$255     // n |= tmp
    POP  1,0            // return(n)

I used the obvious straight-line version.
This computes the result mod \$2^{64}\$.

Duocentehexaquinquagesimal, 10 bytes
1ËвáýŸÚ¦˜Í

Try it online! I/O as characters.

Branch, 12 bytes
^\n}^*^\2^:#

Try it on the online Branch interpreter!
Uses n * (n - 1) / 2
A solution that actually properly produces all the numbers and sums them:
Branch, 15 bytes
[/;{]^[\;^+^]/#

Try it on the online Branch interpreter!
And if you replace the # with ` (shorthand for `P when at the end of a program) you can see that it places the cumulative sums along the main left branch.

Ruby, 24 bytes
n=gets.to_i;p n*(n+1)//2
Direct
Attempt This Online!
Ruby, 24 bytes
n=gets.to_i;p (1..n).sum
The same as previous, but using sum.
Attempt This Online!

Fig, \$2\log_{256}(96)\approx\$ 1.646 bytes
Sa

See the README to see how to run this
Sa # Takes a number as input
S  # Sum
 a # Of the range [1, n]

Chocolate, 1 byte
∑

Try it online!

Knight, 11 bytes
O/*+1=xPx 2

Try it online!

Arturo, 12 bytes
$=>[∑1..&]

Try it

ARBLE, 15 bytes
sum(range(1,n))

Uninteresting answer.
Try it online!

Binary-encoded Golfical, 17 bytes
Hexdump of binary encoding:
00 90 01 15 0c 01 04 01 3c 0e 01 00
02 0a 01 3d 17

The encoded version can be converted to a runnable program image using the encoder utility included in the language's github repository, or run directly by using the -x flag
Original program image:

Magnified 45x with RGB colors labeled:

Alice, 11 bytes
/O
\I@/rd&+

Try it online!
/I\rd&+/O@   Full program flatened
/I\          Reads the input and push it on the stack
   r         Pops, Create a range from 0 to the input on the stack
    d        Pushes on the depth of the stack on the stack
             Flow control instructions
     &+      Pops sum all the numbers in the stack
       /O@   Prints and exit

Desmoslang Assembly, 11 Bytes
IS*.5(D+1OT

ARM Thumb machine code, 8 bytes
0:  1c41  adds  r1, r0, #1  @  n + 1
2:  4348  muls  r0, r1      @  * n
4:  0840  lsrs  r0, r0, #1  @  / 2
6:  4770  bx    lr

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes