text:
Polyglot the OEIS!

Note: This challenge has been moved to Polyglot the (non constant) OEIS! to avoid closure.

Introduction
We all know and love the on-line encyclopedia of integer sequences (OEIS). So what if we made an off-line version? Well, that would be kinda too easy, wouldn't it and how would you select a sequence with our standard interface!? No. We need an easier solution to this. A polyglot!
Input
Your input will be a non-negative integer n.
Output
Your output will either be

The n-th entry of an OEIS sequence OR
The first n entries of an OEIS sequence.

You may take the index to be 1-based or 0-based as you prefer.
Uhm, so where is the Challenge?
You have to polyglot the above functionality. That is if you support languages A, B and C all must implement different OEIS sequences. The choice of sequence is not limited except that you need different ones for all languages.
That is, if you run the provided program in language A, then sequence X shall be generated, if you run the provided program in language B, then sequence Y shall be generated (with X!=Y) and if you run the provided program in language C, then sequence Z shall be generated (with X!=Z && Y!=Z).
Who wins?
The answer with the most sequence/language pairs wins. First tie-breaker is code-size (in bytes) with lower being better. Second tie-breaker is submission time with earlier being better.
Any final Words / Rules?

You must declare which language will generate which sequence.
Standard I/O rules apply.
If different encodings are used between languages, both programs must use the same byte-sequence.
Language (Python 2/3) revisions do count as different languages. Different implementations of a language (such as Browser JS vs Node.js) also count as different languages.
Standard loopholes apply.

The fact that it's mots sequence/language pairs seems kind of weird.

Do different versions/implementations of the same language count as different langauges (like Python2 and Python3, or like browser JS and Node.js)?

@ThePirateBay different versions do count as different languages (see point 4 of "Any final Words / Rules?"). As for the implementations, I can't find any prior ruling on this particular question. However as they practically define different languages, you can count them as different (but have to specify the interpreter as well). This also makes sense here because you'd have to squeeze different sequences out of the implementations ;)

@ppperry I have to disagree: While every entry from there will be a valid entry here, the reverse is not true. Here all entries have much more freedom and can use non-trivial sequences. Examples I have seen in the two most competetitives answers include the even numbers, the prime numbers, the squares, the non-negative integers and the cubic numbers.

For the uninitiated reader: This question was closed as a duplicate because entries from "the versatile integer printer" are valid and (highly) competitive here as well and because newer challenges generally get closed in favor of old ones.

I really don't think this is a dupe, especially because of the difference in scoring.

I don't think this is a dupe. People (including me) choose to wimp out and use constant sequences. It's not supposed to be that way and it doesn't have to. Answers from there are sometimes valid here, yes, but answers here are not necessarily valid there. This is nothing like the [tag:polyglot] [tag:answer-chaining] challenge, but I could take that polyglot and win this challenge.

Look at the (currently) winning answer; it uses almost all constant sequences.

Meta discussion about dupe

The version of this challenge with constant sequences banned lives here now.

26 languages: C, C++, Cubically, rk, what, Bash, Morse, Ook!, str, Charcoal, Commercial, S.I.L.O.S, memescript, Forked, TRANSCRIPT, Braingolf, Fission, Arcyou, Beam, Beatnik, Cood, COW, Emoji, ><>, Set, NTFJ
Over 1000 bytes >.< but I'm gonna go for the most languages.
Hit Page Down about 10 times if you don't want a description of all the languages.
#\
//ha kkkkkkkkkk ja ha kkkkkkkkkkd ja skd  I7Oq2_
#include<stdio.h>//$+77%6& ..... rk:start print: "11" rk:end  ?!!!!!!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!??!????!        Ook. Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. ⎚8» ##########################################
 /*
echo -n 3;exit
Hey, waiter!
I want 25 of this.
How much is it?
The bill, please.
foo now 9 dollars off!
foo has been selling out worldwide!
a = 10
printInt a
filler what the frick frack thumbtack diddily dack crack pack quarterback frick frack (p 22)
>F9+%&'L+:+:H
Ju is here.
>Ju, 32
>X Ju
 set ! 50
 set ! 56
oom MoO OOM  26➡ #####/
*/main(int a){getchar();printf("%d",sizeof(' '));}/* R"21"
 >2n7n; */

This outputs:

A010709 in C a(n) = 4
A000012 in C++ a(n) = 1
A005843 in Cubically a(n) = 2n
A010850 in rk a(n) = 11
A007395 in what a(n) = 2
A010701 in Bash a(n) = 3
A010716 in Morse a(n) = 5
A000004 in Ook! a(n) = 0
A010727 in str a(n) = 7
A010731 in Charcoal a(n) = 8
A010734 in Commercial a(n) = 9
A010692 in S.I.L.O.S a(n) = 10
A010855 in memescript 1.0 a(n) = 16
A010863 in Forked a(n) = 24
A010871 in TRANSCRIPT a(n) = 32
A010859 in Braingolf a(n) = 20
A010860 in Fission a(n) = 21
A010861 in Arcyou a(n) = 22
A010862 in Beam a(n) = 23
A010863 in Beatnik a(n) = 24
A010864 in Cood a(n) = 25
A000027 in COW a(n) = n + 1
A010865 in Emoji a(n) = 26
A010866 in ><> a(n) = 27
A010867 in Set a(n) = 28
A010868 in NTFJ a(n) = 29

(Links are not all current, I'll eventually update them. I have verified each language.)
C/C++
sizeof(' ') is 1 in C++ and 4 in C. Here's the C/C++ code:
#include <stdio.h>
main(){getchar();printf("%d",sizeof(' '));}

#include <stdio.h> is needed for C++. (This is why I don't like it.)
getchar(); is there because we still technically need input.
printf("%d",sizeof(' ') prints 4 in C and 1 in C++.

Update - the echo -n 3;exit is ignored via \ at the end of the comment on line 1.
Cubically
Cubically ignores everything it doesn't care about as long as no functions get called.
$+7+7%6&
$          read int as input
 +7+7      double it (could be +77, I'll golf everything more if it comes to that)
     %6    print output
       &   exit (the `main()` would cause an infinite loop)

rk
rk is horrible, but good for polyglotting. It ignores everything before rk:start and after rk:end:
rk:start print: "11" rk:end

Pretty simple. A010850 is a constant sequence. "Input is taken via command line arguments." :P
what
The what interpreter reads three bytes at a time. Very stupid but useful.
?!!!??(x50)??!

Gets input (uselessly), goes to next memory cell, adds the ASCII value for 2 (50) to the current memory cell and outputs.
Bash
# <comment>
echo -n 3; exit
<everything ignored because parser already exited>

Also takes input via "command line arguments". I love constant sequences.
Morse
Morse Code is the oldest language used in this thread, I can guarantee. ;) This uses an interpreter I wrote last year for fun. It conveniently ignores everything it doesn't care about.
.....

Constant sequences probably weren't what the OP had in mind when creating the challenge...
Ook!
Ook! is a Trivial Brainf**k Substitution. The interpreter I found is really crappy, reads 11 characters at a time and checks if it's something it cares about. Pasting the code at the end of the first line magically lined it up properly, so the interpreter noticed the Ook! code.
Ook. Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook.

This is equivalent to Brainf**k's ,>+(x48).. Read a character, move to next memory cell, increment to 48 (ASCII code for 0) and print.
str
The str code wanted to be right at the top because something around #include <stdio.h> made it bug out. I had to rearrange the what and Ook! code, since I added something before both of them.
# // I7Oq

# is apparently a valid preprocessing token in C/C++. // comments it out. (That's a capital letter o, in case your screen tries to deceive you.)

I - read input
7 - push 7
O - output
q - turn off STDOUT just in case

I think it's real clever how I is for input and O is for output. Nice language, Conor!
Charcoal
Wow, I like this language, I'm gonna use it more sometime.
Luckily, there's a command to clear the output buffer, ⎚. So it just echoes everything up to the ⎚ on line 2, then clears that. The Charcoal code we care about looks like this:
⎚8»

8 prints 8. » exits with a parse error, which is allowed by default.
Commercial
This one was a bit less nice because it wanted me to have its code on separate lines. I had to rearrange the C/C++ comments a bit.
For some reason, C emitted a warning and then didn't compile when I replaced the // with /*. So it's on its own line, making Bash annoyed but still prints the desired number.
foo now 9 dollars off!
foo has been selling out worldwide!

variable now x dollars off creates a new variable variable with value x.
variable has been selling out worldwide! prints the variable's value.

At least the interpreter is forgiving about unrecognized code...
Oh, I also updated all the TIO links. That was a pain so I'll probably only do so every 10 or when I quit working on this polyglot. Fun challenge, thanks!
S.I.L.O.S
That had one of the clearest, most concise READMEs I've ever seen. Simple as this:
a = 10
printInt 10

Adding this code didn't even break anything!
Memescript 1.0
Why does this language exist >.<
The interpreter was being lame so I had to add filler to get it to see what the.
filler what the frick frack thumbtack diddily dack crack pack quarterback frick frack

what the - start code
frick frack thumbtack - push 11
diddily dack crack pack - add 5
quarterback frick frack - output as integer

Forked
Forked is my new 2d lang, it's only partially implemented. It's not in a triangle or a cube or anything interesting, it's just a fun simple esolang.
Unfortunately, having # // I70q on the first line had a mirror / in the way of the source code. I moved some things around so the mirrors look like this:
 \
//

The mirrors are pretty self-explanatory; the code enters from the top left and exits at the bottom left. Then it hits this code near the bottom:
>F9+%&

> directs the IP west. F pushes 15, 9 pushes 9. + adds them, % prints as integer, & exits.
Note: This may not work in future Forked versions, depending on how # will handle invalidity.
TRANSCRIPT
This is a cool language. I don't really understand some of the syntax (specifically, >), but it's fun nevertheless. Also forgiving about syntax errors which is why I chose to use it.
Here's the code we care about:
Ju is here.
>Ju, 32
>X Ju

Ju is here. defines an NPC (variable) named Ju. (Short for Julie, which was used in the example.)
>Ju, 32 puts 32 in Ju's memory (sets it to 32).
>X Ju prints Ju. (Where did X come from?!?)

Braingolf
Apparently, the code does some wacked out stuff to the stack but outputs 0 at EOF, so I found a place I could put the code without breaking anything else, found a sequence that ended in 0, and let it do its implicit output at the end.
2_

Pushes 2 and prints it. 0 is printed at the end, printing 20. More constant sequences, yay!
Fission
For such a complicated language, this was pretty easy - just modified this:
R"21"

Prints 21. Surprisingly, putting this anywhere in the code worked just fine.

R creates atom travelling right.
"21" stores the string 21 in that atom.
Implicit output at the end of the program, I guess.

Arcyou
Another language forgiving about syntax errors. Here's the code we care about:
(p 22)

Arcyou is pretty much identical to LISP, but golfier. p is print, 22 is 22.
Also, it printed None due to the main(). I added a there, C++ complained, I made it int a and everything's running smoothly again.
Beam
The hardest part about adding this language was finding the spec. Luckily, there's a mirror of esolangs.org! Thanks, totallyhuman!
Beam uses the same control flow as Forked but that's it. So I put its code after Forked's exit command.
'L+:+:H

' increments the store and L sets the beam to the store. + increments, : outputs as integer.
I tried ++:+:H first, but the beam apparently is not initialized to 0. The store is, though.
Beatnik
Beatnik is a language almost as awful as some I've written and am planning to write. It uses Scrabble word values. Here's its code:
ha kkkkkkkkkk ja ha kkkkkkkkkkd ja skd

Here is the Scrabble values for those:
5 50 9 5 52 9 17

5 50 - push 50
9 - print as ASCII
5 52 - push 52
9 - print as ASCII
17 - exit

I used a comma and a bunch of Z's initially, which messed with str. Fixed by removing the useless comma and changing 5 z's to 10 k's.
Cood
Cood cares about this (explanation on the right)
Hey, waiter!           (start program)
I want 25 of this.     (set memory to 25)
How much is it?        (print as int)
The bill, please.      (finish script)

COW
Yay, a non-constant sequence! :D
oom MoO OOM
oom          read integer
    MoO      increment
        OOM  print as integer

Emoji
26➡
..   push string
 26    "26"
    ➡  print top of stack

><>
Another language I'm going to use more; I love how this wraps.
It initially hits #, which bounces the IP backwards, wraps around, hits \, which wraps vertically to the bottom, hits >, then it sees 2n7n;.
2n7n;
2      push 2
 n     output
  7    push 7
   n   output
    ;  exit

Set
I recall this being used in the answer-chaining polyglot. Luckily, ASCII-only's TIO interpreter doesn't care about syntax errors!\
set ! 50         (print 2)
set ! 56         (print 8)

NTFJ
That's another one of your langs I've used, Conor.... this is possibly the strangest. All I do is push truthy values (#) and use / to push the number of items on the stack to the stack and * to print.
(line 3) ##########################################
(line 4) /*
(line 21) #####/
(line 22) *

I didn't really mess with the code in the middle. It probably does things to the stack, and this will probably be a pain down the road, but whatever, it works.

sizeof(' ') is 4 in C but 1 in C++

hey :( charcoal is as good as rk for polyglotting (using clear and double right angle bracket to start/end)

@ASCII-only I'll look into adding it when I'm back on a PC

@ASCII-only how do I make Charcoal not just echo everything?

you can clear it? ⎚ also end it with a parse error via », see the codepage in the wiki for ascii codes for use with -e

hey :( why not just ⎚8» (plus you shouldn't use charcoal for such an easy task :P it's a golflang after all)

technically printf("%d",sizeof(' ')) is undefined behavior, because size_t should be printed with %zu

Haha, fission code does something funny. \ in R"21"\ is mirror and sends atom somewhere in your code, where it meets smth that make it print internal info :D (there is no implicit output in fission)

And you have line >F9+%&'L+:+:H, which messes up fission, cos L spawns atom. Output: 21uui          k          }}          k          21

This answer is REALLY good : lots of langages, and a clear link and explanation for each of them. And the sequence is in order. You deserve more upvotes!

9 Languages, 217 bytes
2/3#^4 9

5
if 1:
  x="+++++++[>+++++++<-]>."#3
  R = input()
  try:
    print(int(eval(chr(49)+chr(47)+chr(40)+chr(49)+chr(47)+chr(50)+chr(41))*int(R)))
  except:
    print(7**int(R))
    R="6"#N;
    n=2
  R

In Jelly, produces A000027.

In Python2, produces A000420.

In Python3, produces A005843.

In Brainfuck, produces A000012.

In ///, produces A007395.

In Ohm, produces A010734.

In ><>, produces A010709.

In Fission 2, produces A010722

In Whitespace, produces A0000004

Jelly outputs the first n elements of the sequence instead of the n-th element.
><> and Whitespace exit with an error after giving the correct output, which is allowed by default.
How it works
Jelly
Jelly sees only the R at the bottom, which tells it to output range(input).
Python 2
After removing unused lines, Python 2 sees:
if 1:                     # just do it, where it is the following:
  R = input()             # set input to R
  try:                    # try:
    print(int(eval(chr(49)+chr(47)+chr(40)+chr(49)+chr(47)+chr(50)+chr(41))*int(R))
  # print(int(1/(1/2))*int(R)). Floor division causes 1/(1/2) to be
  # 1/0, raising a division by 0 error, going into the except block
  except:
    print(7**int(R))      # print 7 to the power of R.

Python 3
if 1:                     # just do it, where it is the following:
  R = input()             # set input to R
  try:                    # try:
    print(int(eval(chr(49)+chr(47)+chr(40)+chr(49)+chr(47)+chr(50)+chr(41))*int(R))
  # print(int(1/(1/2))*int(R)). Float division causes 1/(1/2) to be
  # 1/0.5=2. This is multiplies by R and printed.
  except: # The except block is not called
    print(7**int(R))

Brainfuck
Brainfuck sees:
+++++++    Set counter cell to 7
[          While counter != 0
  >          Go to storage cell (default to 0)
  +++++++    Increase by 7
  <          Return to counter cell
  -          Decrement
]          EndWhile
>.         Print out chr value of storage cell => chr(49) = "1"

///
/// sees:
<Something including the top-left 2>
# replace the empty string with 2 and output

Ohm
Ohm sees:
<Something including the top 9>
# implicitly output 9.

><>
><> sees:
2/3#^4 9   -- the IP travels right (pushing 2) until it hits `/`
 f         -- it travels up (pushing f=15) until it hits `/`
           -- it travels right (pushing 3) until it hits `#`
           -- it travels left (pushing 3) until it hits `/`
           -- it travels down (pushing f=15) until it hits `/`
           -- it travels left (pushing 2 then 9 then 4) until it hits `^`
           -- it travels up. When it hits `n`, it prints the 4
           -- it then hits some characters ><> doesn't like,
           -- ending the program with an error.
    n

Fission
Fission sees:
R="6"#N;
R          - start an IP/atom going right
  "        - start string
   6       - 6
    "      - end string
      N    - add newline
       ;   - end program. (implicit) print

(it sees other lines, but those don't affect output)
Whitespace
Some of this has likely been lost in copy-paste.
Whitespace sees the following, where N represents linefeed, S represents space, and T represents tab. All actual newlines should be ignored.
NSSN
SSSN  -- push 0
TN    -- print it
NTNSNSSNSSSSNSSNSSSSNSSNSSSSNSSSSNSSSSNSSN

9 Languages, 107 98 bytes
Sub 100!
Python 2, Python 3, JavaScript, PHP, brainfuck, Retina, Gaia, ><>, Ohm.
2 //1;""""0
;function a($n){return $n**(2+!"0");};
/*."""
print(input()*2)
1#/i$%o<
() #\7751cep*/

A005843 in Python 2
A020338 in Python 3
A000290 in JavaScript
A000578 in PHP (run with -r)
A000012 in brainfuck (IO by byte value)
A001477 in Retina
A000040 in Gaia
A000035 in ><> (IO by byte value)
A000004 in Ohm
Explanations
Python 2 and 3
All the two Python versions see is the following:
print(input()*2)

The difference in their behaviour is that input() evals the line of input read in Python 2, but just returns the string in Python 3. So Python 2 prints 2n, but Python 3 prints the string of n repeated twice.
JavaScript and PHP
What these languages see is the following:
2
;function a($n){return $n**(2+!"0");};

Which defines a function a that computes the result. The difference in behaviour comes from !"0".
In JavaScript, "0" is a truthy value. So !"0" becomes false, which gets cast to 0. Thus JavaScript computes $n to the power 2+0.
In PHP, the "0" is actually a falsy value, because (for whatever reason) it gets cast to the number 0 before being treated as a boolean. So !"0" is true. Thus PHP computes $n to the power 2+1.
brainfuck
The + in the JS/PHP part increments the cell, then the . in the middle outputs it. Thus it outputs the byte value 1 for any input.
Retina
Retina does a lot of regex substitutions on the input, using regexes that don't even remotely match any number that would be given as input (so no replacements are made). Then it prints the result of the replacements, which is just the input.
Gaia
The only line executed by Gaia is:
() #\7751cep*/

(               Decrement the input
 ) #            Find the first (input-1) numbers such that (number+1) is true
    \           Delete that list of numbers
     7751c      Push the string "ṇ"
          e     Eval it (the command for "nth prime number")
           p    Print the result
            */  Some other stuff that doesn't matter

><>
What's relevant to ><> is
2 /

  /i$%o<

The fish starts at the top left, pushing 2. It moves over to the /, mirroring and looping to the bottom of the code. It hits the other / and move right. It pushes input (i), swaps the top stack elements ($), computes input mod 2 (%), and outputs as a byte (o). Then it moves left and tries to output again, which causes the program to exit with an error since there's nothing left on the stack.
Ohm
Ohm only executes the first line:
2 //1;""""0

Which is some random stuff and then 0. Only the top stack element is printed implicitly.

for whatever reason The reason probably lies in the fact that all input to PHP comes as strings ($argn, $argv, $_GET, $_POST, DB results) combined with the loose typing (PHP has types, but it knows no type declarations - apart from objects and functions). PHP must be able to calculate with strings or you´d have to cast everything you need as a number explicitly; and that would be a tremendously enerving business.

5 languages - Braingolf, Pyth / GolfScript / Brain-Flak / Pyke / Brachylog, MATL, Retina / Jelly / Commentator and 05AB1E / 2sable / Oasis
Q

This has two three multi-language-sequence polyglots. In Braingolf, this computes the triangular numbers (A000217), Pyth and GolfScript and Pyke (and Brain-Flak) are 0-indexed and use the non-negative integers (A001477), MATL is 0-indexed and uses the positive integers (A000027),  Retina, Commentator and Jelly always output 0 (A000004), regardless of the input and 05AB1E, Oasis and 2sable always output 1 (A000012).

Try Braingolf online!

Try Pyth online! or Try GolfScript! or Try Pyke! or Try Brachylog! (thanks to @DanTheMan) or Check out Brain-Flak instead!

Try MATL online!

Try Retina online! (thanks to @jimmy23013) or Try Jelly! or Check out Commentator instead!

Try 05AB1E online! or Try 2sable! or Check out Oasis instead!

How?
In Braingolf, the nth triangular number is calculated using Q (1-indexed).
In Pyth and GolfScipt and Pyke (and Brain-Flak), the input just gets printed as it is.
In MATL, Q means increment by 1, hence it displays the number given as input plus 1.
In Retina, Commentator and Jelly, Q always prints 0. Similarly, 05AB1E, Oasis and 2sable output 1.

Trying to find a work-around with Golfscript too

And A000004 in Retina.

@jimmy23013 Yay, thanks a lot!

This has gone crazy....

Brachylog can join Pyth, GolfScript, and Brain-Flak. Try it here.

Also, it's too bad there's no all 81s sequence, as that would work in HQ9+ with byte value output.

@DanTheMan Thanks for Brachylog.

5 languages (05AB1E, CJam, Jelly, MATL, Retina), 8 bytes
rdK*p
%2

This produces:

In 05AB1E: sequence A007395;
In CJam: sequence A008602;
In Jelly: sequence A000035;
In MATL: sequence A000012;
In Retina: sequence A000027.

The CJam program exits with an error after producing the correct result in STDOUT, which is allowed by default.

3 languages, QBIC, QBasic and Javascript
'';/*`
input a
?a*q
''*/f=()=>1;

QBasic, all 0's; A000004
'';/*`          the ' makes this a comment for QBasic
input a         this asks for an input, stores it in a
?a*q            Multiplies a by q, which is not set in QBasic and therefore 0. ? prints this.
''*/f=()=>1;    And another comment

QBIC, positive ints, A000027
'';/*`          The ' opens a code literal: This tells the QBIC interpreter that the next bit is pure QBasic.
                The following ' injects a comment in the output QBasic code, the ` at the end closes the code literal.
input a         this does the same as the QBasic bit
?a*q            Multiplies a by q, which is 1 in QBIC and just yields the input. ? prints this.
''*/f=()=>1;    And another comment

Javascript, all 1's, A000012
'';/*`          ''; is mostly harmless. /* opens a multiline comment. ` is ignored
input a         commented
?a*q            and commented
''*/f=()=>1;    This closes the comment and defines function f() that always just returns 1

3 languages: Gaia, CJam, Retina, 7 bytes
1_0

@+

A005843 in Gaia, A010850 in CJam, and A000004 in Retina.
Try it Gaia!
Try it CJam!
Try it Retina!
Explanations
Gaia
Gaia only executes the bottom line, which reads input (@) and adds it to itself.
CJam
1      Push 1
 _     Copy it
  0    Push 0
   @   Bring the bottom 1 to the top
    +  Add 1+0, making the stack `[1 1]`. Implicity push the stack flatten and joined.

Retina
Replaces instances of 1_0 in the input with nothing. Then counts and outputs the matches of the regex @+ in the result. Since this won't ever appear, it outputs 0 for any n.

11 languages: C, C++, JavaScript (nodejs), Ruby,  JavaScript (modern browser), Perl, dc, ><>, brainfuck, JavaScript (spidermonkey), and Pyramid Scheme, 342 bytes
I wanted to see if I could break 9 10. I decided to use mainly non-esoteric languages.
        //;<<E;#6nq>>>-[++>+[+<]>]>^\
/*   ;n7<>>                       / \:
#include <stdio.h>              //out\
//                              ^-----
//                              -
struct k {};int main(){printf("%i",1+sizeof(struct k));}
//;\
E
//;\
`echo`;  print($??3:5)
;//;#*/  console['log'](this['window']?4:this['print']?9:10)

Results I was able to verify (for input 4) on my machine:
Result in "C" (A000004):
> gcc normal.c -o normal && normal.exe 4
1
Result in "C++" (A000012):
> g++ normal.cpp -o normal && normal.exe 4
2
Result in "JavaScript" (A007395):
> node normal.js 4
10
Result in "Ruby" (A010701):
> ruby normal.rb 4
3
Result in "Perl" (A010716):
> perl -f normal.pl 4
5
Result in "dc" (A010722):
> echo 4 | dc -f normal.dc
6

Pyramid Scheme

30 languageversions, 4 bytes
B3%0

This works with 30 different versions (cube sizes) of Cubically.
I promise I'm not cheating!
However, I'd appreciate it if this answer didn't get accepted. There are other more impressive polyglots, including my other (previously winning) one.

Language (Python 2/3) revisions do count as different languages. Different implementations of a language (such as Browser JS vs Node.js) also count as different languages.

This works in 30 different cube sizes a.k.a. versions of Cubically. I added support for multiple cube sizes last night and made changes live this morning. Each cube size is considered a different language version due to the fact that each cube size completely changes how math is done in the language.
I realized afterwards that this feature is very useful for polyglotting. As making the change was very difficult, useful for lots of things, and required hours of messing with dynamic memory in C, I clearly did not add it just for that reason.
Explanation
B3 turns the BACK face 90° clockwise three times. In Cubically 3x3x3, faces have nine cubelets (three per line), so this gets the cube to look like this:
   111
   000
   000
511222330444
511222330444
511222330444
   555
   555
   333

That's useful, because in Cubically 4x4x4, it looks like this:
    1111
    0000
    0000
    0000
5111222233304444
5111222233304444
5111222233304444
5111222233304444
    5555
    5555
    5555
    3333

Run-down
Version   Sequence
2x2x2     A007395
3x3x3     A010701
4x4x4     A010709
5x5x5     A010716
6x6x6     A010722
7x7x7     A010727
8x8x8     A010731
9x9x9     A010734
10x10x10  A010692
...       ...
32x32x32  A010871

Looks like the constant sequences finally stopped at 32. Seems random but there you are.

This would win the versitaile integer printer challenge!

@ppperry That's true, because this basically prints its version number. With enough memory, this could print an unlimited number of integers.

4 languages, Braingolf, 2col, arcplus, Lean Mean Bean Machine
 O
 2
+$
_/
1_
;
(p
4)
3

That's right! I've successfully created a polyglot of all of my own languages!
Braingolf, A000012, the all 1s sequence.
Try it online!
Braingolf usually has implicit output of the top of the stack at program termination, but the semicolon prevents that. As a result, the only important code is this:
1_
;

1_ pushes 1, then pops and prints the top of the stack, while ; suppresses implicit output. There are no other braingolf print operators in the code, so nothing else is printed.
However it's a little more difficult than that, as polyglots tend to be. The $ on line 3 is LMBM's "print value" operator, but is Braingolf's "silent" operator. This means that normally the $ would "silence" the _ in Braingolf, and cause it to silently pop the top of the stack. As a result we throw in an extra line:
_/

The slash is explained under LMBM, but the underscore is for Braingolf, it pops the top of the stack before we push the 1, consuming the silent operator in the process. This allows our 1_ to function as expected.
2col, A010701, the all 3s sequence.
Try it in 2collIDE!
2col is to blame for the peculiar layout of the code, as 2col requires every line to be no more than 2 characters in width. Some of these lines do some weird stuff in 2col, but ultimately as there is no valid 2col print operator in this code, the implicit output kicks in and outputs the return value of the last line.
3

This is the last line, an integer literal, which returns itself.
2col is also the cause of the + on line 3. This does nothing, but prevents 2col throwing a TypeError when trying to execute the $ command.
arcplus, A010709, the all 4s sequence.
Try it online! (code not included)
arcplus is inspired by arcyou, which is inspired by LISP. arcplus ignores everything not in parentheses. Here's the bit in parentheses:
(p
4)

This is a function call. Specifically the p function, which is shorthand for print. Any whitespace is valid separator between the function name and the argument, including a newline, so this is essentially (print 4). I hope I don't need to explain what that does.
Lean Mean Bean Machine, A007395, the all 2s sequence.
No online interpreter available
This one was surprisingly easy, despite being a rather awkward 2d language. Here's what matters for LMBM:
 O
 2
+$
_/
1_
;

O is a spawn point. A marble is spawned here with a spin of 1, and a value of 0. It hits the 2, setting its value to 2, then hits the $, printing its value. The / moves the marble one space to the left, and changes its spin to 0, note that the underscore to the left of the slash is not executed, as "gravity" takes effect after the left shift before the marble has time to execute another symbol. The marble then drops to 1, setting its value to 1, and finally hits the semicolon, silently killing the marble. LMBM terminates once all marbles are destroyed.

2 languages: /// and ><>
/9/0//8/0//7/0//6/0//5/0//4/0//3/0//2/0//1/0//00/0//
>1n;//

/// outputs https://oeis.org/A000004 all 0's, and ><> does https://oeis.org/A000012 all 1's
Try ><> online!
Try /// online!

Is there info on /// somewhere? The link on TIO points to https://esolangs.org/wiki//// which obviously doesn't work

@LangeHaare Search esolangs for "Slashes"

@LangeHaare that would work, but esolangs.org is down.

@StepHen You can use esolangs.zem.fi, it's a mirror of esolangs.org and it's working :)

@MDXF yes, but http://esolangs.zem.fi/wiki/// doesn't

@StepHen esolangs.zem.fi/wiki/Slashes

@LangeHaare esolang is back up, the link to /// should work now.

C89, C99, C++, Bash, Python
Look, ma, no esolangs!
#include<stdio.h>/*
"""
"; */int x=32//*
/4+//* */
4;/*
echo 3;exit
"""
#*/
#define print(y)main(){printf("%d",x-(int)sizeof(' '));}
print(2)

This prints:

https://oeis.org/A010709 in C89
https://oeis.org/A010731 in C99
https://oeis.org/A010850 in C++
https://oeis.org/A010701 in Bash
https://oeis.org/A007395 in Python

C89
Single-line comments did not exist in C89, so it sees this:
#include<stdio.h>

     int x=32/

4;

#define print(y)main(){printf("%d",x-(int)sizeof(' '));}

So x is 8, sizeof(' ') is 4, outputs 4.
C99
Single-line comments did exist in C99, so it sees this:
#include <stdio.h>

     int x=32
/4+
4;

#define print(y)main(){printf("%d",x-(int)sizeof(' '));}

So x is set to 12, sizeof(' ') is 4, output is 8.
C++
C++ sees the same thing as C99 but sizeof(' ') is 1. Outputs 11.
Bash
Bash sees this:
"""
"; */int x=32//*
/4+//* */
4;/*
echo 3;exit

Okay, so those first four lines cause a lot of parsing errors. Other than that, prints 3.
Python
Python sees this:
print(2)

Everything else is commented out one way or another. Prints 2.


text:
Number of sums of factors
Given a positive integer n > 1 determine how many numbers can be made by adding integers greater than 1 whose product is n.  For example if n = 24 we can express n as a product in the following ways
24 = 24             -> 24            = 24
24 = 12 * 2         -> 12 + 2        = 14
24 = 6 * 2 * 2      -> 6 + 2 + 2     = 10
24 = 6 * 4          -> 6 + 4         = 10
24 = 3 * 2 * 2 * 2  -> 3 + 2 + 2 + 2 = 9
24 = 3 * 4 * 2      -> 3 + 4 + 2     = 9
24 = 3 * 8          -> 3 + 8         = 11

We can get the following numbers this way:
24, 14, 11, 10, 9

That is a total of 5 numbers, so our result is 5.
Task
Write a program or function that takes n as input and returns the number of results that can be obtained this way.
This is a code-golf question so answers will be scored in bytes, with fewer bytes being better.
OEIS sequence
OEIS A069016

Suggested test case 240

Since 36 has caused a lot of debate, I suggest it as a test case.

I don't see how 36 should give 5. I get [10, 13, 20, 36, 11, 15] as unique numbers

@WheatWizard 12 * 3

I have 2,2,3,3 -> 10, 2,6,3 -> 11, 2,2,9 -> 13, 12,3 -> 15, 2,18 -> 20, 36 -> 36

(2*2)+(3)+(3)=10

36 should be 7 because (2*3)+(2*3)=12 should be in the list too.

..and if 36 should output 7 then 240 should output 23.

Suggested test case: 2310. Should output (I may be wrong) 49.

Brachylog, 8 bytes
{~×≜+}ᶜ¹

Try it online!
Explanation
{    }ᶜ¹  Count unique results of this predicate:
 ~×       Create list of numbers whose product is the input.
   ≜      Label the list, forcing it to take a concrete value.
    +     Take its sum.

I'm not entirely sure why ~× only produces lists with elements above 1, but it seems to do so, which works great in this challenge.

It only produces lists with elements above 1 because otherwise there are infinitely many lists, which is often bad in challenges like these.

Gaia, 9 14 13 bytes
Bug fixed at the cost of 5 bytes thanks to Jonathan Allan, then 1 byte golfed.
ḍfḍ¦e¦Π¦¦Σ¦ul

Try it online! or try as a test suite
Explanation
ḍ              Prime factors
 f             Permutations
  ḍ¦           Get the partitions of each permutation
    e¦         Dump each list of partitions (1-level flatten the list)
      Π¦¦      Product of each partition
         Σ¦    Sum each group of products
           u   Deduplicate
            l  Length

Can you provide a TIO link containing the corresponding outputs the numbers 1 through 36 inclusive?

This is exactly like the Jelly answer...

The OP says the output for 36 should be 5, not 6

It gives the correct answer for every other number... so I'm not totally sure the 36 -> 5 is right...

According to OEIS, 36 gives 7 instead of 5, but yours gives 6

Apparently Gaia leaves out [6 6]

This should work for 14, maybe you can golf it further?

... ah you do have a way to flatten by 1 (I had tried to use Z for it)

Jelly,  11 15  14 bytes
+4 bytes fixing up a bug (maybe a better way?)
-1 byte by abusing symmetry
ÆfŒ!ŒṖ€ẎP€S€QL

A monadic link taking and returning positive integers
Try it online! or see a test suite
How?
Updating...
ÆfŒ!ŒṖ€ẎP€S€QL - Link: number, n      e.g. 30
Æf             - prime factors of n        [2,3,5]
  Œ!           - all permutations          [[2,3,5],[2,5,3],[3,2,5],[3,5,2],[5,2,3],[5,3,2]]
    ŒṖ€        - all partitions for €ach   [[[[2],[3],[5]],[[2],[3,5]],[[2,3],[5]],[[2,3,5]]],[[[2],[5],[3]],[[2],[5,3]],[[2,5],[3]],[[2,5,3]]],[[[3],[2],[5]],[[3],[2,5]],[[3,2],[5]],[[3,2,5]]],[[[3],[5],[2]],[[3],[5,2]],[[3,5],[2]],[[3,5,2]]],[[[5],[2],[3]],[[5],[2,3]],[[5,2],[3]],[[5,2,3]]],[[[5],[3],[2]],[[5],[3,2]],[[5,3],[2]],[[5,3,2]]]]
       Ẏ       - tighten                   [[[2],[3],[5]],[[2],[3,5]],[[2,3],[5]],[[2,3,5]],[[2],[5],[3]],[[2],[5,3]],[[2,5],[3]],[[2,5,3]],[[3],[2],[5]],[[3],[2,5]],[[3,2],[5]],[[3,2,5]],[[3],[5],[2]],[[3],[5,2]],[[3,5],[2]],[[3,5,2]],[[5],[2],[3]],[[5],[2,3]],[[5,2],[3]],[[5,2,3]],[[5],[3],[2]],[[5],[3,2]],[[5,3],[2]],[[5,3,2]]]
        P€     - product for €ach          [[30],[6,5],[10,3],[2,3,5],[30],[10,3],[6,5],[2,5,3],[30],[6,5],[15,2],[3,2,5],[30],[15,2],[6,5],[3,5,2],[30],[10,3],[15,2],[5,2,3],[30],[15,2],[10,3],[5,3,2]]
               -   ...this abuses the symmetry saving a byte over P€€
          S€   - sum €ach                  [30,11,13,10,30,13,11,10,30,11,17,10,30,17,11,10,30,13,17,10,30,17,13,10][10,17,11,30,10,17,13,30,10,13,11,30,10,13,17,30,10,11,13,30,10,11,17,30]
            Q  - de-duplicate              [30,11,13,10,17]
             L - length                    5

JavaScript (ES6) 107 bytes
f=(n,o,s=0,i=2,q=n/i)=>(o||(o={},o[n]=t=1),i<n?(q>(q|0)|o[e=s+i+q]||(o[e]=t+=1),f(q,o,s+i),f(n,o,s,i+1)):t)

Ungolfed:
f=(n,                                 //input
   o,                                 //object to hold sums
   s=0,                               //sum accumulator
   i=2,                               //start with 2
   q=n/i                              //quotient
  )=>(
  o||(o={},o[n]=t=1),                 //if first call to function, initialize o[n]
                                      //t holds the number of unique sums
  i<n?(                               //we divide n by all numbers between 2 and n-1
    q>(q|0)|o[e=s+i+q]||(o[e]=t+=1),  //if q is integer and o[s+i+q] is uninitialized,
                                      //... make o[s+i+q] truthy and increment t
    f(q,o,s+i),                       //recurse using q and s+i
    f(n,o,s,i+1)                      //recurse using n with the next i
  ):t                                 //return t
)

Test cases:

f=(n,o,s=0,i=2,q=n/i)=>(o||(o={},o[n]=t=1),i<n?(q>(q|0)|o[e=s+i+q]||(o[e]=t+=1),f(q,o,s+i),f(n,o,s,i+1)):t)

s= [];

for(i = 1; i <= 103 ; i++) {
  s.push(f(i));
}

console.log(s.join`, `)

To verify that the function calculates the correct sums, we can output the keys of the object instead of t:

f=(n,o,s=0,i=2,q=n/i)=>(o||(o={},o[n]=t=1),i<n?(q>(q|0)|o[e=s+i+q]||(o[e]=t+=1),f(q,o,s+i),f(n,o,s,i+1)):Object.keys(o))

console.log(f(24));  //9, 10, 11, 14, 24

Python 2, 206 bytes
k=lambda n,i=2:n/i*[k]and[k(n,i+1),[i]+k(n/i)][n%i<1]
def l(t):
 r=[sum(t)]
 for i,a in enumerate(t):
    for j in range(i+1,len(t)):r+=l(t[:i]+[a*t[j]]+t[i+1:j]+t[j+1:])
 return r
u=lambda n:len(set(l(k(n))))

Try it online!
Explanation
    # Finds the prime factors
k=lambda n,i=2:n/i*[k]and[k(n,i+1),[i]+k(n/i)][n%i<1]
    # Function for finding all possible numbers with some repetition
def l(t):
    # Add the current sum
 r=[sum(t)]
    # For each number in the current factors
 for i,a in enumerate(t):
    # For all numbers further back in the current factors, find all possible numbers when we multiply together two of the factors
    for j in range(i+1,len(t)):r+=l(t[:i]+[a*t[j]]+t[i+1:j]+t[j+1:])
 return r
    # Length of set for distinct elements
u=lambda n:len(set(l(k(n))))

194 bytes

Python 3, 251 bytes
lambda n:1 if n==1else len(set(sum(z)for z in t(f(n))))
f=lambda n:[]if n==1else[[i]+f(n//i)for i in range(2,n+1)if n%i==0][0]
t=lambda l:[l] if len(l)==1else[[l[0]]+r for r in t(l[1:])]+[r[:i]+[l[0]*e]+r[i+1:]for r in t(l[1:])for i,e in enumerate(r)]

Try it online!
The design is basic:

factorize n into its prime factors (a prime factor may appear several times : 16 -> [2,2,2,2]). That's the function f.
compute the partitions of the list of prime factors, and multiply the factors in each partition. The partitions are found as in https://stackoverflow.com/a/30134039, and the products are computed on the fly. That's the function t.
The final function gets the products of each partition of n and sums them, the get the number of different values.

The result for 2310=2*3*5*7*11 is 49.
EDIT : Maybe needs fix, but I don't have time to look at it now (I'm in a hurry). Hint: is the result correct for 2310=2*3*5*7*11 ? I dont' think so.
EDIT2 : Huge fix. See above. Previous (buggy) version was:
Try it online!
f computes the factors (, with a (0, n) instead of (1, n) as first element.
The lambda splits each factor in "sub-factors" and sums the those "sub-factors".

-19 bytes.

-1 byte from @notjagan improvement

Thanks to @notjagan, but the initial code was so wrong...

Thanks to @HalvardHummel, but same remark as above.

Mathematica, 110 bytes
If[#==1,1,Length@Union[Tr/@Select[Array[f~Tuples~{#}&,Length[f=Rest@Divisors[s=#]]]~Flatten~1,Times@@#==s&]]]&

source: Stack Exchange

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

sort: votes


text:
Take me to your leaderboard
Have you ever found a good challenge to answer, answered it and then found out somebody posted a solution with a better score in the same language?
Challenge
Write a program/function that takes a PPCG question ID and outputs a leaderboard.
A leaderboard consists of the rank, the language, the score, the author and the URL of each answer. This can be output as a newline delimited string, a list of strings, a "dictionary", etc..

Rank

The rank of an answer is its position in the score hierarchy (lowest first).
Answers with shared scores must have the same rank.

Language

The name of the language is always between the last # on the first line and the first ,.
It may be a link to documentation, which must be handled by taking the user-facing text.

Score

The score of a answer is the last number on the first line.
It may be a decimal number.

Author

The author of an answer is the display name of the user that posted it.

URL

The URL of an answer will go straight to the answer.
URL shorteners are disallowed.

Specifications

Standard I/O rules apply.
Standard loopholes are forbidden.
This challenge is not about finding the shortest approach in all languages, rather, it is about finding the shortest approach in each language.
Your code will be scored in bytes, usually in the encoding UTF-8, unless specified otherwise.
Explanations, even for "practical" languages, are encouraged.

Test cases
Note that these show example output formats which need not be strictly followed. These examples were taken at the time of sandboxing, they might be outdated.
Input: 28821

1. PCRE flavor, score 40 by jimmy23013 (https://codegolf.stackexchange.com/a/31863)

Input: 92944

1. Jelly, score 12 by Dennis (https://codegolf.stackexchange.com/a/92958)
2. Befunge-98, score 38 by Hactar (https://codegolf.stackexchange.com/a/98334)
3. ><>, score 41 by Sp3000 (https://codegolf.stackexchange.com/a/92980)
4. TovTovTov, score 810147050 by Yaniv (https://codegolf.stackexchange.com/a/93048)

Input: 47604*

1. Pyth, score 28.08 by Jakube (https://codegolf.stackexchange.com/a/47642)
2. APL, score 39.6 by jimmy23013 (https://codegolf.stackexchange.com/a/47606)

Input: 133793

1. Lua, score 9.06 by TehPers (https://codegolf.stackexchange.com/a/135775)
2. C# (.NET Core), score 10.20 by Kamil Drakari (https://codegolf.stackexchange.com/a/135764)
3. Cubically, score 86.98 by Kamil Drakari (https://codegolf.stackexchange.com/a/137695)

*Note that this challenge has 3 answers, however the GolfScript answer doesn't have a comma in the header which makes it undefined behaviour.
In a few better formats:
28821, 92944, 47604, 133793

28821 92944 47604 133793

28821
92944
47604
133793

This challenge was sandboxed.

Is using libraries allowed? For example the HTML Agility Pack for C#.

@IanH. That is the same as always, you can use libraries but make sure to specify that in the header. Wouldn't want it to mislead people on leaderboards. ;)

Does the PPCG default leader board count as a language? If yes does it count as 1 byte? :P

@TheLethalCoder You can golf the stack snippet and post it as a JS answer (no, it does not count as 1 byte :P). However, I'm sure you guys can come up with more interesting answers.

@Downvoter Do you, you know, have a reason to downvote? Just curious...

I like your title :P

Also, is 12.000000 ok instead of 12 because of fickle float precision?

@Dopapp Yes, that is fine.

For questions that contain answers with poorly formed headers (as in test case 47604), is the allowance for undefined behaviour applied just to those answers or does it cover the full output for the question? How should outputs that contain answers with the same score be numbered? Consider, for an example, a question with 2 answers sharing second place, should the ranking  go 1,2,2,3 or 1,2,2,4 or is either acceptable?

@Shaggy Undefined behaviour only for the answer with a bad header. Both 1,2,2,3 and 1,2,2,4 are acceptable but they must share the rank if they share scores.

C# (.NET Core), 1059 1049 1033 998 973 bytes
Saved 53 bytes thanks to @TheLethalCoder.
Saved 25 bytes thanks to @Mr. Xcoder.
using HtmlAgilityPack;namespace System.Linq{n=>{var u="http://codegolf.stackexchange.com/";var l=new Collections.Generic.List<Tuple<string,float,string,string>>();foreach(var x in new HtmlWeb().Load(u+"questions/"+n).GetElementbyId("answers").Descendants("div").Where(p=>(p.Attributes["id"]?.Value??"").Contains("answer-"))){var b=x.Descendants().First(p=>(p.Attributes["class"]?.Value)=="post-text");var h=b.Descendants().ElementAt(1).InnerText;l.Add(new Tuple<string,float,string,string>(h.Split(',',' ')[0],float.Parse(h.Split(' ').Reverse().First(p=>float.TryParse(p.Replace('.',','),out var y)).Replace('.', ',')),b.ParentNode.Descendants("td").Last(p=>(p.Attributes["class"]?.Value)=="post-signature").Descendants("div").Reverse().ElementAt(1).Descendants("a").First().InnerText,u+"a/"+x.Attributes["id"].Value.Split('-')[1]));}var s=new string[l.Count];for(var i=0;i<l.Count;){var m=l[i];s[i]=++i+$". {m.Item1}, score {m.Item2} by {m.Item3} ({m.Item4})";}return s;}}

Uses the HTMLAgilityPack.
There are probably better solutions to this using the StackOverflow API, but this is a raw HTML solution.

Ungolfed code: (Unchanged for readability & reference)
n =>
{
    // Retrieve the HTML of the question page with ID n
    var doc = new HtmlWeb().Load("https://codegolf.stackexchange.com/questions/" + n);
    // Get all the answers
    var answers = doc.GetElementbyId("answers").Descendants("div").Where(d => (d.Attributes["id"]?.Value ?? "").Contains("answer-"));

    // Format: Language, Score, Author, URL
    var l = new Collections.Generic.List<Tuple<string, float, string, string>>();

    // Loop over every answer element
    foreach (var a in answers)
    {
        // Get the content of the answer post
        var b = a.Descendants().First(d => (d.Attributes["class"]?.Value ?? "") == "post-text");
        // Get the header
        var h = b.Descendants().ElementAt(1);
        // Dummy variable for the TryParse
        float y;
        // Create a new Tuple
        var v = new Tuple<string, float, string, string>(
            h.InnerText.Split(',', ' ')[0], // The language
            float.Parse(h.InnerText.Split(' ').Reverse().First(x => float.TryParse(x.Replace('.',','), out y)).Replace('.', ',')), // The score of the answer
            b.ParentNode.Descendants("td").Last(d => (d.Attributes["class"]?.Value ?? "") == "post-signature").Descendants("div").Reverse().ElementAt(1).Descendants("a").First().InnerText, // The author
            "https://codegolf.stackexchange.com/a/" + a.Attributes["id"].Value.Split('-')[1] // The url to the answer
            );
        l.Add(v); // Add the tuple to the collection
    }
    var s = new string[l.Count]; // An array to save the leadboard content
    for (var i = 0; i < l.Count;i++)
    {
        var m = l[i]; // The current element
        s[i] = $"{i+1}. {m.Item1}, score {m.Item2} by {m.Item3} ({m.Item4})"; // Format the data
    }
    return s;
}

Place your code into namespace System.Linq then move so you can remove the using. Also could you add a formatted version so it's easier to read all that code? :)

As far i can see you only use d and a in one place so you could probably inline them inside the foreach making it foreach(var x in new HtmlWeb().Load("https://codegolf.stackexchange.com/questions/"+n).GetElementbyId("answers").Descendants("div").Where(p=>(p.Attributes["id"]?.Value??"").Contains("answer-")))
also if you're using C# 7 you should be able to remove float y; and change the TryParse to float.TryParse(p.Replace('.',','),out var y)

you could probably also save a lot of bytes if you use the new C# 7 tuple declaration

You can also inline v into the Add() call. Set h to .InnerText to save the repeated calls to it. Pre increment i at {i+1}->{++i}. Then move it out of the string ++i + $". {m....

Thought it had already been mentioned but you can inline b as well.

And are the ??"" needed? Comparing null to a string returns false anyway?

@TheLethalCoder I don't think I can inline be, as I use it mutliple times (once for h and once in the tuple initializer. And you are right, the ??"" should be able to be cutted. Although, do you need them when calling .Contains()? (To prevent null.Contains())

Somehow I missed you using it at h and not sure, probably though.

Question: Can https: be replaced by http: for -1 bytes?

@Mr.Xcoder Yes it can! And it gave me some idea for additional URL shorting, for -25 bytes ;)

Can someone explain why they downvoted this answer?

Python 2 + requests + BeautifulSoup + re, 547 519 512 bytes
from requests import*
from bs4 import BeautifulSoup as B
import re
w,h='.stackexchange.com/','http://'
def D(i):l=B(i['body'].split('\n')[0],'html.parser').text;return[l.split(',')[0],float(re.findall(r'\d*\.\d+|\d+',l)[-1]),i['owner']['display_name'],'%scodegolf%sa/'%(h,w)+`i['answer_id']`]
d=sorted([D(i)for i in get('%sapi%squestions/%d/answers?site=codegolf&filter=withbody'%(h,w,input())).json()['items']],key=lambda x:x[1])
h=r=0
for x in d:r+=x[1]>h;h=x[1];print'%d. %s, score %f by %s (%s)'%tuple([r]+x)

Output for this question (137878):
1. Python 2 + requests + BeautifulSoup + re, score 512.000000 by Dopapp (http://codegolf.stackexchange.com/a/138043)
2. C# (.NET Core), score 973.000000 by Ian H. (http://codegolf.stackexchange.com/a/137933)

Ungolfed:
from requests import*
from bs4 import BeautifulSoup
import re

# [score, owner, lang, link]
def data(item): # extracts data from each answer
    owner = item['owner']['display_name']
    link = 'http://codegolf.stackexchange.com/a/'+`item['answer_id']`
    line1 = BeautifulSoup(item['body'].split('\n')[0], 'html.parser').text # first line of the answer
    lang = line1.split(',')[0]
    score = float(re.findall(r'\d*\.\d+|\d+', line1)[-1])
    return [score, owner, lang, link]

# datas :P
datas = [data(item)for item in get('http://api.stackexchange.com/questions/%d/answers?site=codegolf&filter=withbody'%input()).json()['items']]

sortedDatas = sorted(datas, key=lambda x: x[0]) # sort the data by the score

highestScore=rank=0 # This is for doing the ranking in case there are identical scores
for d in sortedDatas:
    if d[0] > highestScore:
        highestScore = d[0]
        rank += 1
    print '%d. %s, score %f by %s (%s)' % (rank, d[2], d[0], d[1], d[3]) # format the line

You can remove some bytes with import BeautifulSoup as b, no?

@pizzakingme, yes good idea!

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


text:
Print a booklet
Reading a book is easy, but printing a book can be a bit tricky. When printing a booklet, the printer needs to have the pages arranged in a certain manner in order to be read from left to right. The way this is done is using a pattern like below
n, 1, 2, n-1, n-2, 3, 4, n-3, n-4, 5, 6, n-5, n-6, 7, 8, n-7, n-8, 9, 10, n-9, n-10, 11, 12, n-11…

Test Cases
4  page booklet: 4, 1, 2, 3
8  page booklet: 8,1,2,7,6,3,4,5
12 page booklet: 12,1,2,11,10,3,4,9,8,5,6,7
16 page booklet: 16,1,2,15,14,3,4,13,12,5,6,11,10,7,8,9
20 page booklet: 20,1,2,19,18,3,4,17,16,5,6,15,14,7,8,13,12,9,10,11
Task
Your task is to, given an integer n that is a multiple of 4, display an array of numbers that could be used to print a book of n pages.
Note: As long as the output generates the correct numbers, whether delimited by spaces, commas, hyphens, or parenthesis, any method to getting to a solution can be used
This is a code-golf question so answers will be scored in bytes, with the fewest bytes winning.

Are we guaranteed that input will always be divisible by 4 or even an even number? Either way, could you add a few more test cases, please? And welcome to PPCG :)

Welcome to PPCG and nice first challenge! Note that we recommend proposing new challenges in the sandbox before posting them.

Your input needs to be a multiple of 4

Can I have a trailing comma in the output?

Would be nice (but maybe trivial) to support any value, filling with blank pages if needed (another challenge, maybe?)

Can we delimit the array with a space, hyphen, or other delimiter instead of a comma?

Can we create a function to generate this sequence, or does the final result need to print to standard output? That is, are we allowed to create a function instead so that when you call the function and print its output, it will show the correct sequence? I see a lot of answers doing that already (including one of my answers), but it is not explicitly said we can in the objectives.

Smallest byte wins and method to getting there can be used, as long as the output generates the correct numbers, whether delimited by spaces, commas, hyphens, or parenthesis.

05AB1E, 9 8 7 bytes
L`[Žˆrˆ

Try it online!
Explanation
L           # push range [1 ... input]
 `          # split as separate to stack
  [Ž        # loop until stack is empty
    ˆ       # add top of stack to global list
     r      # reverse stack
      ˆ     # add top of stack to global list
            # implicitly display global list

JavaScript (ES6), 49 45 bytes
Saved 4 bytes with help from @RickHitchcock
f=(n,k=1)=>n<k?[]:[n,k,k+1,n-1,...f(n-2,k+2)]

Demo

f=(n,k=1)=>n<k?[]:[n,k,k+1,n-1,...f(n-2,k+2)]

console.log(JSON.stringify(f(4)))
console.log(JSON.stringify(f(8)))
console.log(JSON.stringify(f(12)))
console.log(JSON.stringify(f(16)))
console.log(JSON.stringify(f(20)))

Non-recursive, 51 bytes
n=>[...Array(n)].map((_,i)=>[2*n-i,,++i][i&2]+1>>1)

Demo

let f =

n=>[...Array(n)].map((_,i)=>[2*n-i,,++i][i&2]+1>>1)

console.log(JSON.stringify(f(4)))
console.log(JSON.stringify(f(8)))
console.log(JSON.stringify(f(12)))
console.log(JSON.stringify(f(16)))
console.log(JSON.stringify(f(20)))

47 bytes:  f=(n,a=1)=>n<a+3?[]:[n,a,a+1,n-1,...f(n-2,a+2)]

@RickHitchcock n<a is actually enough, so that's 4 bytes saved. Thanks!

Python 2, 99 93 88 58 56 55 bytes
f=input()
for i in range(1,f/2,2):print-~f-i,i,i+1,f-i,

Try it online!
-6 bytes by removing unneeded indentation, thanks Oliver Ni
-5 bytes by changing the conditional, thanks Luis Mendo
-30 bytes by optimizing the print statements, thanks Arnold Palmer
-2 bytes by putting the loop on one line, thanks nedla2004
-1 byte by doing some wizardry, thanks Mr. Xcoder

Save bytes by using 1 space instead of 4.

Oh yeah, I always forget about that. Thanks.

-29 bytes using a lambda (although this might be different enough to warrant a separate answer).

@notjagan Go ahead and post that yourself if you want.

58 bytes by changing your print up just a bit.  It now prints f-i+1,i,i+1,f-i in each loop instead of conditionally printing the last value.  This also allowed removing the initial print f,.

You could move the whole for loop into one line. for i in range(1,f/2,2):print f-i+1,i,i+1,f-i,

55 bytes, replace print f-i+1, with print-~f-i, in order to remove the whitespace

What I have done is no wizardry :)), let me explain. I used the bitwise operator ~. ~i is equivalent to -i-1. Now, I only negated ~i, such that I had -~i, which means -(-i-1) = i+1. The point is that you cannot remove the space in there unless you have a bracket or an operator, and the only appropriate prefix operator, in this case is ~, which lets you remove the space.

Python 3, 68 63 62 bytes
−5 bytes thanks to @notjagan (removing spaces and using [*...] instead of list()).
−1 byte thanks to @ovs (*1 instead of [:]).
def f(n):r=[*range(1,n+1)];return[r.pop(k%4//2-1)for k in r*1]

Try it online!

-5 bytes.

You can use r*1 instead of r[:] for -1 byte`

Python 2, 46 bytes
lambda n:map(range(1,n+1).pop,n/4*[-1,0,0,-1])

Try it online!
Generates the range [1..n] and pops from the front and back in the repeating pattern back, front, front, back, ...

Python 2, 49 bytes
f=lambda n,k=1:n/k*[0]and[n,k,k+1,n-1]+f(n-2,k+2)

Try it online!
Generates the first 4 elements, then recursively continues with the upper value n decreased by 2 and the lower value k increased by 2.

Python 2, 49 bytes
lambda n:[[n-i/2,i/2+1][-i%4/2]for i in range(n)]

Try it online!
Directly generates the i'th value of the list, using -i%4/2 as a Boolean for whether to take the lower or higher value.

MATL, 19 17 10 bytes
:t"0&)@o?P

Try it online!
Explanation
:          % Implicitly input n. Push range [1 2 ... n]
t          % Duplicate
"          % For each (that is, do n times)
  0&)      %   Push last element, and then subarray with remaining elements
  @        %   Push 1-based iteration index
  o?       %   Is it odd? If so
    P      %     Reverse subarray of remaining elements
           %   Implicit end
           % Implicit end
           % Implicitly display stack

Jelly,  12  11 bytes
Improved to 11 bytes, "Combinatorial Methods":
9Bṁ×ḶṚÆ¡‘Œ?

Try it online!
How?
This uses permutation calculations and the factorial number system:
9Bṁ×ḶṚÆ¡‘Œ? - Link n                        e.g. 16
9B          - nine in binary                     [1,0,0,1]
  ṁ         - mould like n                       [1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1]
    Ḷ       - lowered range(n)                   [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
   ×        - multiply                           [0,0,0,3,4,0,0,7,8,0,0,11,12,0,0,15]
     Ṛ      - reverse                            [15,0,0,12,11,0,0,8,7,0,0,4,3,0,0,0]
      Æ¡    - convert from factorial base        19621302981954 (=15*15!+12*12!+...+3*3!)
        ‘   - increment                          19621302981955 (we actually wanted 1*0! too)
         Œ? - shortest permutation of natural numbers [1,2,...] that would reside at that
            -   index in a sorted list of all permutations of those same numbers
            -                                    [16,1,2,15,14,3,4,13,12,5,6,11,10,7,8,9]

Unimproved 12 byter, "Knitting Patterns":
RṚ‘żRs2Z€FḊṁ

Try it online!
How?
This is the simple approach, it creates two strands, interleaves them and then trims the loose ends:
RṚ‘żRs2Z€FḊṁ - Link: n                      e.g. 8
R            - range(n)                          [1,2,3,4,5,6,7,8]
 Ṛ           - reverse                           [8,7,6,5,4,3,2,1]
  ‘          - increment                         [9,8,7,6,5,4,3,2]
    R        - range(n)                          [1,2,3,4,5,6,7,8]
   ż         - zip (interleave)                  [[9,1],[8,2],[7,3],[6,4],[5,5],[4,6],[3,7],[2,8]]
     s2      - split into chunks of length 2     [[[9,1],[8,2]],[[7,3],[6,4]],[[5,5],[4,6]],[[3,7],[2,8]]]
       Z€    - transpose €ach (cross-stitch?!)   [[[9,8],[1,2]],[[7,6],[3,4]],[[5,4],[5,6]],[[3,2],[7,8]]]
         F   - flatten                           [9,8,1,2,7,6,3,4,5,4,5,6,3,2,7,8]
          Ḋ  - dequeue (removes excess start)    [8,1,2,7,6,3,4,5,4,5,6,3,2,7,8]
           ṁ - mould like n (removes excess end) [8,1,2,7,6,3,4,5]

This is clever. +1

Octave, 43 36 bytes
A port of this answer in C (gcc) can be found here.
@(n)[n-(k=1:2:n/2)+1;k;k+1;n-k](:)';

Explanation

k=1:2:n/2: Generates a linear sequence from 1 to n/2 in steps of 2.  Note that this is immediately used in the next step.
[n-k+1;k;k+1;n-k]: Creates a 4 row matrix such that the first row creates the sequence n, n-2, n-4... down to n-(n/2)+2, the second row is 1, 3, 5... up to n/2 - 1, the third row is the second row added by 1 and the fourth row is the first row added by 1.
[n-k+1;k;k+1;n-k](:)': This stacks all of the columns of this matrix together from left to right to make a single column vector, and we transpose it to a row vector for easy display.  Stacking the columns together this way precisely creates the sequence desired.

Note that this is an anonymous function, so you can assign it to a variable prior to using it, or you can use the built-in ans variable that gets created after creating the function.
Try it online!

Hi, I think you can even shorten it by making it a anonymous function, so you don't have to call input. See this link: https://www.gnu.org/software/octave/doc/v4.0.3/Anonymous-Functions.html#Anonymous-Functions

@Michthan True.  I originally did it that way because the code was more than one statement.  I took another crack at it so remove the call to input and I abused the syntax a bit more by storing the base incremental vector as I was creating the first row and taking the input n from the actual anonymous function input itself so I can now fit it into one statement.  Thanks!

R, 48 bytes (improved)
Thanks to @Giuseppe for -7 bytes!
n=scan();(x=order(1:n%%2))[order(-(n/2+.5-x)^2)]

The trick is that x=1:n;x[order(x%%2)] is equivalent to order(1:n%%2).
Try it online!
R, 55 bytes (original)
Golfed
n=scan();x=1:n;x=x[order(x%%2)];x[order(-(n/2+.5-x)^2)]

Ungolfed with comments
Read n from stdin.
n=scan()

Define x as sequence of pages from 1 to n.
x=1:n

Order pages so even pages are before uneven pages.
x=x[order(x%%2)]

Order pages in descending order with respect to the centre of the book computed by n/2+.5.
x[order(-(n/2+.5-x)^2)]

Example with 8 pages:

centre is 4.5;
pages 1 and 8 are the most distant from the centre, but 8 comes first because 8 is even;
pages 2 and 7 are the next most distant from the centre, but 2 comes first as 2 is even;
and so on.

Try it online!

nice, way better than my (stolen) solution

48 bytes!

The trick was noticing that (1:n)[order(1:n%%2)] is the same as order(1:n%%2)

Java 8, 84 72 bytes
n->{for(int j=0;++j<n;System.out.printf("%d,%d,%d,%d,",n--,j++,j,n--));}

or
n->{for(int j=0;++j<n;System.out.print(n--+","+j+++","+j+","+n--+","));}

-12 bytes thanks to @TheLethalCoder's comment on the C# answer.
Old answer (84 bytes):
n->{int r[]=new int[n],i=1,N=n,J=1;for(r[0]=n;i<n;r[i]=-~i++%4<2?J++:--N);return r;}

Explanation:
Try it here.
n->{                  // Method with integer parameter and no return-type
  for(int j=0;++j<n;  //  Loop from 1 to `n` (exclusive)
    System.out.printf("%d,%d,%d,%d,",n--,j++,j,n--)
                      //   Print four numbers simultaneously
  );                  //  End of loop
}                     // End of method

Haskell, 42 bytes
n#a|n<a=[]|x<-n-2=n:a:a+1:n-1:x#(a+2)
(#1)

Try it online!
One byte longer:
Haskell, 43 bytes
f n=[1,3..div n 2]>>= \x->[n-x+1,x,x+1,n-x]

Mathematica, 54 53 45 bytes
Join@@Range[#][[(-1)^k{k,-k}]]~Table~{k,#/2}&

Explanation
Join@@Range[#][[(-1)^k{k,-k}]]~Table~{k,#/2}&  (* Input: # *)
                              ~Table~{k,#/2}   (* Iterate from k=1 to #/2 *)
      Range[#][[            ]]                 (* From {1..#}, take... *)
                      {k,-k}                   (* k-th and negative k-th element *)
                                               (* negative k-th = k-th from the end *)
                (-1)^k                         (* Reversed for odd k *)
Join@@                                         (* Join the result *)

Python 2, 64 63 bytes
 -1 byte thanks to ovs!
lambda n:sum([[i,i+1,n-i,n+~i]for i in range(1,n/2,2)],[n])[:n]

Try it online!

n-i-1 can be n+~i

Bash + Perl + Groff + Psutils, 48 bytes
perl -nE'say".bp
"x--$_'|groff|psbook>/dev/null

Shows output on stderr. Output contains some trailing garbage.
Example of use:
$ echo 20 | perl -nE'say".bp
> "x--$_'|groff|psbook>/dev/null
[20] [1] [2] [19] [18] [3] [4] [17] [16] [5] [6] [15] [14] [7] [8] [13] [12]
[9] [10] [11] Wrote 20 pages, 4787 bytes

C (gcc), 66 bytes
A port of my Octave answer to C (gcc):
f(n,i){for(i=1;i<n/2;i+=2)printf("%d %d %d %d ",n-i+1,i,i+1,n-i);}

Try it online!

cQuents, 21 bytes
=n::n-z+1,z+1,x-1,z-1

Try it online!
Explanation
                            Implicit input n
=n                          First item in the sequence is n
  ::                        Mode :: (Sequence 2): print sequence from 1 to n
                            Comma delimited items are rotated through
    n-z+1,                    n - previous + 1
          z+1,                previous + 1
              x-1,            third-previous - 1
                  z-1         previous - 1

R, 64 60 bytes
Devastatingly outgolfed by djhurio! His answer is quite elegant, go upvote it.
n=scan();matrix(c(n-(k=seq(1,n/2,2))+1,k,k+1,n-k),4,,T)[1:n]

A port of rayryeng's Octave answer.
Try it online!
original solution (64 bytes):
f=function(n,l=1:n)`if`(n,c(l[i<-c(n,1,2,n-1)],f(n-4,l[-i])),{})

Recursive function.
Try it online!

First time someone's ever used an answer of mine as inspiration.  Thanks :)

It was hard to beat you, but I managed this with 55 byte answer (https://codegolf.stackexchange.com/a/138045/13849).

Perl 5, 47 + 1 (-n) = 48 bytes
$,=$";print$_--,$i+++1,$i+++1,$_--,''while$_>$i

Try it online!

Managed to find a slightly different approach, but ended up with the exact same byte count! Try it online!

Swift 3, 74 bytes
func g(f:Int){for i in stride(from:1,to:f/2,by:2){print(f-i+1,i,i+1,f-i)}}

Try it online!
Swift 3, 60 bytes
{f in stride(from:1,to:f/2,by:2).map{(f-$0+1,$0,$0+1,f-$0)}}

For some reason, this does not work in any online environment I have tried so far. If you want to test it, put var g= in front of it, and call it with print(g(12)) in Xcode (Playgrounds).
Here is a picture after I've ran it in an Xcode playground, version 8.3.1 (Running Swift 3.1):

QBIC, 25 bytes
[1,:/2,2|?b-a+1,a,1+a,b-a

Although the input is %4, the actual rhythm is 2-based.
Explanation
[1,:/2,2|   FOR ( b=1; b <= <input>/2; b=b+2)
?           PRINT
 b-a+1,     n
 a,         1
 1+a,       2
 b-a        n-1

Python 2, 50 bytes
A port of Arnauld's JS answer.
f=lambda n,k=1:n>k and[n,k,k+1,n-1]+f(n-2,k+2)or[]

Try it online!

n-k-1 is n+~k.

Common Lisp, 79 bytes
(defun f(n &optional(k 1))(and(> n k)`(,n,k,(1+ k),(1- n),@(f(- n 2)(+ k 2)))))

Try it online!

Lua, 94 bytes
For this challenge I actually came up with 2 different methods that are both 94 bytes.
Method 1:
function f(n,i)i=i or 1 return n>i and('%s,%s,%s,%s,%s'):format(n,i,i+1,n-1,f(n-2,i+2))or''end

Commented Code:
function f(n,i)
  i=i or 1
  -- On the first iteration i will be nil so I'm setting it's value to 1 if it is.

  return n>i and ('%s,%s,%s,%s,%s'):format(n,i,i+1,n-1,f(n-2,i+2)) or ''
  -- Here i return a ternary statement
  -- If n>i is true, it will return a string using string.format() and part of this is recursion
  -- If it's false, it will just return an empty string
end

Method 2:
function f(n,i)i=i or 1 return n>i and n..','..i..','..i+1 ..','..n-1 ..','..f(n-2,i+2)or''end

This method is similar to the first method however I'm instead returning a concatenated string instead of string.format()
In both methods I have used the concept of n and i getting closer together

PHP, 51+1 bytes
while($i<$k=&$argn)echo$k--,_,++$i,_,++$i,_,$k--,_;

prints page numbers separated by underscore with a trailing delimiter.
Run as pipe with -nR or try it online.

J, 22 bytes
($,)_2|.`]\1+],@,.&i.-

Try it online!
Explanation
($,)_2|.`]\1+],@,.&i.-  Input: integer n
             ]          Identity
                     -  Negate
                  &i.   Form the ranges [0, 1, ..., n-1] and [n-1, ..., 1, 0]
                ,.      Interleave
              ,@        Flatten
           1+           Add 1
    _2    \             For each non-overlapping sublist of size 2
        `                 Cycle between these two operations
      |.                    Reverse for the first, third, ...
         ]                  Identity for the second, fourth, ...
  ,                     Flatten
 $                      Reshape to length n

Pyth, 27 24 23 bytes
-3 bytes by printing throughout instead of at the end.
-1 Thanks to Mr. Xcoder
V:1/Q2 2pjd[-QtNNhN-QNk

Try it online!
Or on the online Compiler/Executor
This is my first real program in Pyth, so there's probably better methods that I don't know about.
Explanation
V:1/Q2 2pjd[-QtNNhN-QNk
V:1/Q2 2                   # For N in range(1, Q/2, 2):
        pjd                # print " ".join(...),
           [-QtNNhN-QNk    # The list [n - (N-1), N, N + 1, n - N, ""] (n is input)

I found some improvements, and decided they deserved their own answer.

By the way, replace FN with V for -1 byte

Pyth, 21 20 bytes
sm[hK-QddhdK):1/Q2 2

Test Suite.
If outputting as a nested list is allowed:
Pyth, 20 19 bytes
m[hK-QddhdK):1/Q2 2

Test Suite.

Explanation

sm[hK-QddhdK):1/Q2 2  - Full program.

 m           :1/Q2 2  - Map over range(1,input()/2,2) with a variable d.
  [         )         - Construct a list with:
   hK-Qd                - Input - d + 1,
        d               - d,
         hd             - d + 1 and
           K            - Input - d.
s                     - Flattens the list and prints implicitly.

Ruby, 40 bytes
->n{1.step(n/2,2){|x|p n-x+1,x,x+1,n-x}}

Try it online!

C#, 107 bytes
int[]F(int p){var a=new int[p];for(int i=0,q=1;q<p;a[i++]=p--){a[i++]=p--;a[i++]=q++;a[i++]=q++;}return a;}

Keep two counters, one starting at 1, one at p.  In each loop iteration, write four elements and just increment or decrement counters after each entry.  When the counters meet in the middle, stop.
int[] F(int p)
{
    var a = new int[p];
    for(int i = 0, q = 1; q < p; a[i++] = p--)
    {
        a[i++] = p--;
        a[i++] = q++;
        a[i++] = q++;
    }
    return a;
}

You can save a few bytes by placing the method in a delegate. Your code would then look like this: p=>{var a=new int[p];for(int i=0,q=1;q<p;a[i++]=p--){a[i++]=p--;a[i++]=q++;a[i++]=q++;}return a;};, with the System.Func<int, int[]> f = not having the included into the bytecount. Also you can add a link to TIO, which is very useful when trying to allow people to try your code out by themselves!

@IanH. When using a lambda the trailing semi colon can be omitted.

Initialise q to 0 and pre increment at q<p -> ++q<p and then remove the second post increment to save a byte. Move the two trailing loop statements into the last stage of the for loop so you can remove the curly braces.

If a trailing comma is allowed the following works for 71 bytes p=>{for(int q=0;++q<p;)System.Console.Write(p--+$",{q++},{q},{p--},");}. TIO.

Haskell, 58 bytes
(x:y:r)#(a:b:s)=x:y:a:b:r#s
f n=take n$n:[1..]#[n-1,n-2..]

Try it online!

C++ (gcc), 89 84 68 bytes
As unnamed generic lambda. n is #pages (%4==0) and C is a reference parameter for the result, an empty container like vector<int> (only push_back is needed).
[](int n,auto&C){for(int i=0,j=0;i<n;C.push_back(++j%4<2?n--:++i));}

previous solution:
#define P C.push_back(
[](int n,auto&C){for(int i=0;i<n;P n--),P++i),P++i),P n--));}

Try it online!
Slightly ungolfed:
auto f=
[](int n,auto&C){
 for(int i=0,j=0;
     i<n;
     C.push_back(++j%4<2 ? n-- : ++i));
}

previous solution slightly ungolfed:
auto f=
[](int n, auto&C){
 for(
  int i=0;
  i<n;
   P n--),
   P++i),
   P++i),
   P n--)
 );
}
;

It was quite straightforward developed and there are sure some minor optimizations in the arithmetics.

Edit1: unification of the arithmetics saved 5 byte
Edit2: after the unification the 4 steps were combined

Usage:
std::vector<int> result;
f(n, result);

Print-Variant, 77 bytes out-dated
If you insist on printing the values, there is this solution:
[](int n,auto&o){for(int i=0;i<n;o<<n--<<' '<<++i<<' '<<++i<<' '<<n--<<' ');}

Where o is your desired std::ostream, like std::cout
Usage (if 2nd lambda was assigned to g):
g(n, std::cout);


text:
Can I restack the buckets?
My little kid has a toy like this:

This toy consists of 10 stackable little buckets, that we are going to number from 1 (the smallest one) to 10 (the biggest one). Sometimes he makes small piles and the toy ends up like this:

We can represent schematically the piles like this:
      1  6
4  9  2  7
5  10 3  8
----------  <-- Floor
1  2  3  4  <-- Pile #

Or, put it another way:
[[4,5],[9,10],[1,2,3],[6,7,8]]

This set of bucket piles is easily restackable to rebuild the original set (the first image) just by consecutively placing piles of smaller buckets inside piles of bigger buckets:
                             1                            1  6
                             2                            2  7
      1  6                   3        6                   3  8
4  9  2  7                   4  9     7                   4  9
5  10 3  8                   5  10    8                   5  10
---------- > [Pile 3 to 1] > ---------- > [Pile 4 to 2] > ---------- > [Pile 1 to 2] > Done!
1  2  3  4                   1  2  3  4                   1  2  3  4

Nonetheless, sometimes my kid tries to build towers, or throws buckets away, and the piles end up being inconsistent and the original set cannot be rebuild just by placing one pile inside another. Examples of this:
[[1,3,2],[4]] (the kid tried to build a tower by placing a bigger bucket
               over a smaller one, we would need to reorder the buckets
               first)
[[1,3,4],[2]] (the kid left aside an unordered bucket, we would need to remove
               bucket #1 from pile #1 before restacking)
[[1,2,3],[5]] (the kid lost a bucket, we need to find it first)

Challenge
Given a list of lists of integers representing a set of bucket piles, return a truthy value if the lists represent an easily restackable set of piles, or falsey in any other case.

Input will be given as a list of lists of integers, representing the buckets from top to bottom for each stack.
There won't be empty starting piles (you won't get [[1,2,3],[],[4,5]] as input).
The total number of buckets can be any within a reasonable integer range.
My kid only has one set of buckets so there won't be duplicate elements.
You can select any two consistent (and coherent) values for truthy or falsey.
The buckets will be labelled from #1 to #N, being N the largest integer in the lists of integers. My kid still does not know the concept of zero.
You may receive the input in any reasonable format as long as it represents a set of piles of buckets. Just specify it in your answer if you change the way you receive the input.
This is code-golf, so may the shortest program/function for each language win!

Examples
Input:  [[4,5],[9,10],[1,2,3],[6,7,8]]
Output: Truthy

Input:  [[6,7,8,9,10],[1],[2],[3,4,5],[11,12,13]]
Output: Truthy

Input:  [[2,3,4],[1],[5,6,7]]
Output: Truthy

Input:  [[1,2],[5,6],[7,8,9]]
Output: Falsey (buckets #3 and #4 are missing)

Input:  [[2,3,4],[5,6,7]]
Output: Falsey (bucket #1 is missing)

Input:  [[1,3,4],[5,7],[2,6]]
Output: Falsey (non-restackable piles)

Input:  [[1,4,3],[2],[5,6]]
Output: Falsey (one of the piles is a tower)

This comes from the sandbox.

Will there ever be duplicate elements? Like [3,4], [4,5]?

@Mr.Xcoder no, there won't be duplicate elements (my kid only has one set of buckets and they are all different.

@Mr.Xcoder I'll add to the question that the return values must be consistent AND coherent. :-)

May we assume that bucket 1 is never missing?

@Pietu1998 bucket #1 can be missing, I just added a test case (in fact, the smallest bucket is the easiest to lose).

The various Tower of Hanoi challenges are related (not duplicates) of this.

Jelly, 6 5 bytes
Thanks to @Lynn for saving 1 byte.
ṢFµJ⁼

Try it online! (comes with test-suite footer)
Explanation
ṢFµJ⁼    Main link. Argument: piles
Ṣ          Sort the piles by the size of the top bucket.
 F         Stack the piles, putting the left one to the top.
   J       See what a full pile with this many buckets would look like.
    ⁼      See if that looks like the pile you built.

I think ṢFµJ⁼ works, but I haven’t thought about all the edge cases.

@Lynn That works assuming bucket 1 isn't missing. I'm not sure if this is guaranteed by the OP.

@Lynn bucket #1 can be missing, yes. I just added a new test case.

If there are buckets missing, then the sorted list will always contain numbers larger than J can return, guaranteeing false output. am I missing something?

I think you can still use the 5-byte version with bucket #1 missing?

@Lynn Oh, I apparently misthought something. Thanks.

Python 2, 53 52 bytes
Thanks for the byte xnor
lambda x:sum(sorted(x),[0])==range(len(sum(x,[]))+1)

Try it online!

I like that starting the sum at []. Pretty tricky

You can save a byte by starting the sum at [0] so that the range can start from 0.

JavaScript (ES6), 59 58 bytes
a=>!(a.sort((a,[b])=>a[i=0]-b)+'').split`,`.some(v=>v-++i)

Explanation
a=>                                                        // given a 2D-array 'a'
     a.sort((a,[b])=>a[i=0]-b)                             // sort by first item
                              +''                          // flatten
    (                            ).split`,`                // split again
                                           .some(v=>v-++i) // i such that a[i] != i+1?
   !                                                       // true if none was found

Test cases

let f =

a=>!(a.sort((a,[b])=>a[i=0]-b)+'').split`,`.some(v=>v-++i)

// truthy
console.log(f([[4,5],[9,10],[1,2,3],[6,7,8]]))
console.log(f([[6,7,8,9,10],[1],[2],[3,4,5],[11,12,13]]))
console.log(f([[2,3,4],[1],[5,6,7]]))

// falsy
console.log(f([[1,2],[5,6],[7,8,9]]))
console.log(f([[2,3,4],[5,6,7]]))
console.log(f([[1,3,4],[5,7],[2,6]]))
console.log(f([[1,4,3],[2],[5,6]]))

05AB1E, 4 bytes
{˜āQ

Try it online!

Haskell, 54 bytes
import Data.List
f l=(sort l>>=id)==[1..length$l>>=id]

Try it online!

Haskell, 37 bytes
import Data.List
(<[1..]).concat.sort

Try it online!
Checks whether the concatenated sorted list is lexicographically smaller than the infinite list [1,2,3,...]. Since there are no duplicates, any missing bucket or out-of-order bucket would cause a value greater than k in the k'th place, making the resulting list be bigger..

PROLOG (SWI), 54 bytes
s(L):-sort(L,M),flatten(M,N),last(N,O),numlist(1,O,N).

Now that's better. Still quite verbose, alas.
Try it online!
The s/1 predicate takes a list as argument and is true if the list is a list of easily stackable buckets.
Improvement in algorithm: if I sort the list before I flatten it, this forces all the sublists to be sorted for the predicate to be true. Slightly "borrowed" from Pietu1998's Jelly answer. Thanks to that I can dump the forall which is more than half of the program (see below for the original answer).
How does it work?
The predicate is true if all of its clauses are true:
s(L) :-
    sort(L,M),                % M is L sorted in ascending order
    flatten(M,N),             % N is the 1-dimention version of M
    last(N,O),                % O is the last elemnt of N
    numlist(1,O,N).           % N is the list of all integers from 1 to O

Previous answer, PROLOG (SWI), 109 bytes
s(L):-flatten(L,M),sort(M,N),last(N,O),numlist(1,O,N),forall(member(A,L),(A=[B|_],last(A,C),numlist(B,C,A))).

Try it online!

Pyth, 6 bytes
UItMsS

Try it here.
Explanation:
UItMsSQ
UI      Invariant from U (range(len(A)) for our purpose)
  tM     Map t (A - 1 for our purpose)
    s     s (flatten 1-deep for our purpose)
     S     S (sort for our purpose)
      Q     Q (autoinitialized to input) (implicit)

Wat?! Add an explanation to the UI part, please

@Mr.Xcoder U <col> is range(len(A)), I <pfn> <any> <n-1:any> is A(B, ...) == B.

Then I got terribly outgolfed >.<. I might golf mine, though. Genius, brilliant solution, now that I see how it works... Congrats!

@Mr.Xcoder It's really just searching the docs for stuff...

No, it's not. I knew that U <col> is range(len(A)), but I didn't realise that porting the Python solution would be shorter...

@Mr.Xcoder I actually ported the Jelly solution.

Let us continue this discussion in chat.

I wrote this solution, but with +0 instead of tM.

@isaacg Well that's basically so that UI doesn't always return False.

Pyth, 9 16 11 bytes (Fixed)
Uses a completely different method from the other answer. A shorter, 7-byte approach can be found below.
!.EtM.++0sS

Test Suite.

Explanation

!.EtM.++0sSQ  -> Full program, with implicit input at the end.

          SQ  -> Sort the input by the highest element in each sublist.
         s    -> Flatten.
       +0     -> Prepend a 0.
     .+       -> Get the deltas of the list (i.e. differences between consecutive elements)
   tM         -> Decrement each element.
 .E           -> Any truthy element (1s are truthy, 0s are falsy)
!             -> Negate (to have coherent truthy / falsy values)

How does this work?
Let's take a couple of examples, which make it easier to understand. Let's assume the input is [[1,3,4],[5,7],[2,6]]. The core of this algorithm is that each delta in the unflattened list must be 1 in order for the buckets to be stackable.

First off, S turns it into [[1, 3, 4], [2, 6], [5, 7]].

Then, s flattens it: [1, 3, 4, 2, 6, 5, 7].

Prepend a 0 in front: [0, 1, 3, 4, 2, 6, 5, 7]

.+ gets the deltas of the list, [1, 2, 1, -2, 4, -1, 2].

tM decrements each element, [0, 1, 0, -3, 3, -2, 1].

Any non-0 integer is truthy in Pyth, so we check if there is any truthy element with .E (which means the stack cannot be formed correctly). We get True.

! negates the result, which turns True into False.

If the input was, for example, [[6,7,8,9,10],[1],[2],[3,4,5],[11,12,13]], the algorithm would work this way:

Sorted by the highest element: [[1], [2], [3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13]] and flattened, with a 0 prepended: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13].

Deltas: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]. All get decremented: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].

There is no truthy element, so we get False. By logical negation, the result is True.

Pyth, 7 bytes
qSlsQsS

Test Suite.
Port of the Python answer and a variation of @Erik's solution.

Thank you very much for taking the time to explain how this works!

Let us continue this discussion in chat.

@Mr.Xcoder What do you mean by tM decrements each element? I would think that decrementing each element of [1, 2, 1, -2, 4, -1, 2] would yield [0, 1, 0, -3, 3, -2, 1]. But that wouldn't help solve the problem, so I must be misunderstanding what decrementing each element means.

@BrianJ tM decreases each element in the list by 1. There is a mistake in my explanation. Will fix.

@BrianJ Fixed. Thanks for spotting that

Oh, and every delta needs to be one because every cup must be present. I understand now. Very clever!

@BrianJ Thank you. It is a bit different from the other approaches we've had so far, even though it's not the shortest.

Japt, 13 12 11 bytes
This could probably be shorter.
ñÎc äaT e¥1

1 byte saved thanks to ETH

Try it or run all test cases

Explanation
                :Implicit input of 2D array `U`
ñÎ              :Sort sub-arrays by their first element
  c             :Flatten
      T         :Prepend 0
    äa          :Consecutive absolute differences
        e¥1     :Does every element equal 1?

Yeah, you're right I think. It was worth a shot though

I think you can save a byte on the last line with either ä-0 e¥J or än0 e¥1

Another similar 13-byte solution: http://ethproductions.github.io/japt/?v=1.4.5&code=8WcgYwqspVVvIPUgcQ==&input=W1s0LDVdLFs5LDEwXSxbMSwyLDNdLFs2LDcsOF1d

@ETHproductions, I have no idea what's happening there! :D Don't think I've had occasion to touch ä for arrays yet. Thanks for the saving.

@Oliver, had that at one stage myself, too :) I was convinced there must be a way to do it in <13 bytes by popping the last item, but it wasn't to be.

@Shaggy Yeah, I wish there was a builtin to grab the last item in an array. Having an array comparison function would've also been pretty useful.

@Oliver, you can grab the last item from an array, without popping it, using sJ for 2 bytes. Also works for strings.

Or just gJ, haha

@ETHproductions: or that too! Ha-ha! Guess that's a sign that I should get myself to the pub!

You can now update the second line to get 9 bytes: https://tio.run/##y0osKPn/P1khjys19HDP4a3//0dHG@kY65jE6kSb6pjpmMfGAgA

@Nit that solution fails for [[1,3,4],[5,7],[2,6]]

11 bytes

@LuisfelipeDejesusMunoz It works when you use the first line of this solution and the second line of the linked solution, just as I said, nine bytes: https://codegolf.stackexchange.com/a/168967/16484

Brachylog, 5 bytes
oc~⟦₁

Try it online!
Explained unifications:
?o₀c₀~⟦₁.
?         The input (implicit)
 o₀       Sorted (subscript default = 0 => ascending)
   c₀     Concatenated (subscript default = 0 => no length check)
     ~    Inverse (find the input)
      ⟦₁   Range (subscript = 1 => [1..input])
        . The output (implicit)

Analytical explanation:
First of all we sort the list of lists, and then we concatenate (i.e. flatten 1-deep) (oc) so that the buckets get stacked right-to-left if possible. Then, to check if the buckets have been stacked correctly (i.e. no missing buckets or towers), we check that the resulting list is an inclusive range from 1 to its length. Now, instead of equal-checking the list with the [1..n] range of its length ({l⟦₁?}), we try to find an input to a function that generates such a range (~⟦₁), if there is one. If an input is found, then the program ends with no issues, so it triggers a true. status. If no input is found, the program fails, triggering a false. status.

Python 2, 43 bytes
lambda l:sum(sorted(l),[0])<range(len(`l`))

Try it online!
Checks whether the concatenated sorted list is lexicographically smaller than [1,2,3,...N] for large N. Since there are no duplicates, any missing bucket or out-of-order bucket would cause a value greater than k in the k'th place, making the resulting list be bigger. The string-length of the input suffices as an upper bound since each numbers takes more than 1 character.

Nice, I thought there should be a way to improve substantially on my solution, and this it it!

MATL, 5 bytes
Sgtf=

Try it online!
(Implicit input, say {[4,5],[9,10],[1,2,3],[6,7,8]})
S - sort input arrays in lexicographic order ({[1,2,3],[4,5],[6,7,8],[9,10]})
g - convert into a single array (cell2mat)
t - duplicate that
f - find indices of non-zero values. Since input here is all non-zeros, returns the list of indices from 1 to length(array) ([1,2,3,4,5,6,7,8,9,10],[1,2,3,4,5,6,7,8,9,10])
= - check that the array is equal to the range 1 to length(array)

Scala, 49 Bytes
p=>{val s=p.sortBy(_(0)).flatten
s==(1 to s.max)}

Ungolfed:
piles: List[List[Int]] =>
{
  val sorted = piles.sortBy(pile=>pile(0)).flatten //Since piles are sequential, we can sort them by their first element
  sorted == (1 to sorted.max) //If all the buckets are present and in order, after sorting them it should be equivalent to counting up from 1 to the max bucket
}

R, 58 bytes
function(v,a=unlist(v[order(sapply(v,min))]))any(a-seq(a))

Try it online!
N.B. : FALSE is the truthy outcome, TRUE is the falsy one

-3 bytes thanks to @JayCe

Explanation :
a=unlist(v[order(sapply(v,min))])  # order the list of vector by the min value and flatten
all(a==seq(a=a))                   # if the flattened list is equal to 1:length then it's ok

Simply seq(a) for 2 byte?. Also, it's allowed to use TRUE as a falsy value and vice versa (just specify in your answer), so you can do any(a-seq(a)) for another byte.

@JayCe: I'm a fool... I was so concerned about seq(a) behaving differently when a is of length 1 and I missed that in this case we'll get the same results :D THanks !

Japt, 9 bytes
ñg c
eUÌõ

Try it online!

Don't forget the new shortcut for g<space> ;)

C# (.NET Core), 157 145 132 bytes
-13 bytes thanks to TheLethalCoder
l=>{var k=l.OrderBy(x=>x[0]).SelectMany(x=>x);return!Enumerable.Range(1,k.Count()).Zip(k,(x,y)=>x==y).Any(x=>!x);}

Byte count also includes
using System.Linq;

Try it online!
Ungolfed:
l => {
        var k = l.OrderBy(x=>x[0])              // First, sort stacks by first bucket
                 .SelectMany(x => x);           // Concatenate stacks into one
        return !Enumerable.Range(1, k.Count())  // Create a sequence [1...n]
               .Zip(k, (x, y) => x == y)        // Check if our big stack corresponds the sequence
               .Any(x => !x);                   // Return if there were any differences
     };

x.First() -> x[0]? Enumerable.Range -> new int[] and Zip with index if possible..? Remove Where and place the condition into Any.

@TheLethalCoder Thank you for the tips! And the new int[] approach would require adding a Select() to get the index, and ultimately make the byte count bigger.

CJam, 11 bytes
{$:+:(_,,=}

Try it online!
Oww :(...yeah! {$:+_,,:)=}

Charcoal, 19 bytes (non-competing?)
Ａ▷m⟦▷s▷vθυ⟧θ⁼θ…·¹Ｌθ

Try it online!
-10 bytes thanks to ASCII-only.
-3 bytes thanks to ASCII-only for a subsequent implementation (see revision history for possibly competing version).
- for truthy,  for falsy.
Input is a singleton list of a list of lists, because of how Charcoal takes input.

It's the first answer in Charcoal I see that uses ＵＰ.

@CarlosAlejo I had to find a way to sort, and the easiest way was just ＵＰsorted.

24 bytes

the ▷ used there makes scope things the priority though so that;s why ＵＰ is still there but i guess you can just avoid using python function names as varnames?

yay added eval as v, also O_O this isn't even an ascii art challenge (no wonder it's so ungolfy :P

@ASCII-only So...this challenge has been way more than intended...right?

what do you mean

@ASCII-only well, two commands were added to a mostly unused command...I didn't really intend that lol

noncompeting doesn't exist anymore because meta consensus, I only added eval, sum and sorted already existed (plus if you want feel free to add short forms for any function you want really)

@ASCII-only Well that consensus is kind of unclear so I've included an ? just in case.

Vyxal, 5 bytes
sf₅ɾ⁼

Try it Online!
s     # Sort
 f    # Flatten
  ₅ɾ  # 1...a.length
    ⁼ # Is equal?

Java 10, 213 bytes
import java.util.*;m->{Arrays.sort(m,(a,b)->Long.compare(a[0],b[0]));var r=Arrays.stream(m).flatMapToInt(Arrays::stream).toArray();return Arrays.equals(r,java.util.stream.IntStream.range(1,r.length+1).toArray());}

Try it online.
It seemed like a good idea when I started, but these builtins only make it longer.. Can definitely be golfed by using a more manual approach..
Inspired by @EriktheOutgolfer's 4-byte 05AB1E answer. 4 vs 213 bytes, rofl.. >.>
Explanation:
import java.util.*;      // Required import for Arrays
m->{                     // Method with 2D integer-array parameter and boolean return-type
  Arrays.sort(m,         //  Sort the 2D input-array on:
    (a,b)->Long.compare(a[0],b[0]));
                         //  The first values of the inner arrays
var r=Arrays.stream(m).flatMapToInt(Arrays::stream).toArray();
                         //  Flatten the 2D array to a single integer-array
return Arrays.equals(r,  //  Check if this integer-array is equal to:
  java.util.stream.IntStream.range(1,r.length+1).toArray());}
                         //  An integer-array of the range [1, length+1]

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


text:
Superior Highly Composite Numbers
A superior highly composite number is an integer where the ratio of its count of divisors to some power of the number is as high as possible. Expressing this as a formula:
Let d(n) be the number of divisors of n, including the number itself. For a given integer n, if there exists a number e such that d(n)/n^e is greater than or equal to d(k)/k^e for every integer k, then n is a highly composite number.
For more, see Superior highly composite number at Wikipedia, or A002201 at OEIS.
Here are the initial values:
2, 6, 12, 60, 120, 360, 2520, 5040, 55440, 720720, 1441440, 4324320, 21621600, 367567200, 6983776800, 13967553600, 321253732800, 2248776129600, 65214507758400, 195643523275200, 6064949221531200

Your challenge is to take an index n, and output the nth number in this sequence.
You may use 0 or 1 indexing, and you may make a program which is only correct up to the limits of your language's data type(s), as long as it can handle the first 10 values at a minimum.
This is code golf. Standard loopholes apply.

Mathematica, 277 bytes
(A=AppendTo;p[f_]:=Module[{p=f[[1]],k=f[[2]]},N[Log[(k+2)/(k+1)]/Log[p]]];m=#;f={{2,1},{3,0}};o=1;l={2};x=Table[p[f[[i]]],{i,o+1}];For[n=2,n<=m,n++,i=Position[x,Max[x]][[1,1]];A[l,f[[i,1]]];f[[i,2]]++;If[i>o,o++;A[f,{Prime[i+1],0}];A[x,p[f[[-1]]]]];x[[i]]=p[f[[i]]]];Times@@l)&

input

[21]

output

6064949221531200

input

[50]

output

247899128073275948560051200231228551175691632580942972608000