text:
Detonate a string
Given any string, print it in the form of a triangle where the text runs up and down along each diagonal. For example, an input of "Hello World" should output:
                    d
                  l
                r   d
              o   l
            W   r   d
              o   l
        o   W   r   d
      l       o   l
    l   o   W   r   d
  e   l       o   l
H   l   o   W   r   d
  e   l       o   l
    l   o   W   r   d
      l       o   l
        o   W   r   d
              o   l
            W   r   d
              o   l
                r   d
                  l
                    d

The space between each character in a row must be at least 1, in order to maintain the proper format.

May we assume the string isn't empty?

@Mr.Xcoder Yes you may

The space between each character in a row must be at least 1: Does this mean that H l o W r d is a valid center row? Asking because in your example each row has 3 spaces between each character.

@Emigna My example is valid because 3 spaces counts as "at least 1".

Yes of course. I was simply asking if my example is valid as well. Making sure I'm not misinterpreting :)

@Emigna I misunderstood you question, my apologies. Yes, your example would be valid.

Leading or trailing spaces allowed?

@LuisMendo not allowed

@machiavelli Your own example has trailing spaces after the l in each line

@dzaima I interpreted a trailing space as one after the rightmost character, such as the d.

Further to @LuisMendo's question are leading/trailing newlines allowed?

@DomHastings leading/trailing newlines are not allowed

Slightly related :P

Charcoal, 10 7 bytes
↗ＥＬθ✂θιＵＥ¹
Try it online! Try it online! Links are to verbose version of code. Explanation:
    ↗       Print up and to the right
     ＥＬθ✂θι All suffixes of the input, as a list down and to the right
    ＵＥ¹     Insert blank columns
First time I got to use the ＵＥ command.

I knew Charcoal would be one of the first answers here.. Was almost tempting to start myself, but I'm way to inexperienced with it to finish a solution in time, and it would get out-golfed anyway.. ;)

wow, thats really great.

+1 for the scissors symbol, I assume that's for the slice??

As only 1 space is required between each char in a row, you could remove ＵＥ¹

@Emigna ...but this was my big chance to use ＵＥ...

@officialaimm Indeed. Also conveniently Charcoal will default the third and fourth parameters to slice, because ＵＥ doesn't parse as an expression.

I don't think you need the ＵＥ¹ part, since it's not necessary to have empty columns.

@EriktheOutgolfer ...but this was my big chance to use ＵＥ..

@Neil It's -3 bytes! -3 for a nice sacrifice! Who doesn't want some nice -3?

@EriktheOutgolfer What you're supposed to say is, "You can't let 05AB1E beat you, can you?"

05AB1E, 10 8 7 bytes
Thanks to Emigna for saving 2 bytes!
ðâƶ.cðζ

Uses the 05AB1E encoding. Try it online!

As per this line The space between each character in a row must be at least 1 you can remove ¶«. (also verified the validity with OP )

@Emigna Thanks! :)

Might want to update the Tio link :)

@Mr.Xcoder ninja'd

Might want to change the code though, it's still the 10-byte version :P

@Mr.Xcoder oh yeah haha, thanks

Clever use of â in ðâ instead of Sð«!

newbie question : where are the rules that allow this to be counted as 7 bytes rather than 7 characters, totaling 12 bytes?

@DougCoburn Not sure if there are any, but that's not necessary. The hexadecimal version of my code is F0 E2 8F 2E 63 F0 07. If you use a 7-byte binary file containing the bytes described in the previous sentence, the program would still work, so I'm allowed to claim 7 bytes. The custom encoding is just there to make the code more readable.

Python 2, 75 bytes
s=input()
k=l=len(s)
while k>1-l:k-=1;m=abs(k);print' '*m+' '.join(s[m::2])

Try it online!
Ruud saved 3 bytes.

This has been allowed by the OP: 78 bytes. The space on each row must be at least 1.

75 bytes

C, 86 78 73 70 chars
for(int i=1,j=1-n;i=putchar(j*j<i*i&i-j?s[i-1]?:13:32)^13?i+1:++j<n;);

Try it online!
Explanation
Naive implementation: two cycles, fill from top to bottom, left to right (99 bytes):
for(int j=1;j<n*2;j++){for(int i=0;i<n;i++)printf("%c ",(i+j)%2&&i+1>=abs(j-n)?s[i]:' ');puts("");}

Here, puts() just prints \n to the output. Let’s combine variable declarations and combine j++ with something (94 bytes):
for(int i,j=0;++j<n*2;){for(i=0;i<n;i++)printf("%c ",(i+j)%2&&i>=abs(j-n)?s[i]:' ');puts("");}

Good. Variable j has a range 0...2n; let it be within -n...n, this makes the math simpler. Notice that boolean expression at the right of && always has the value 0 or 1. This means we can replace && with &. 91 byte:
for(int i,j=-n;++j<n;){for(i=0;i<n;i++)printf("%c ",~(i+j)%2&i>=abs(j)?s[i]:' ');puts("");}

And now we realized we printing an extra space. And yeah, we don’t need printf() to print just a single symbol. 86 bytes:
for(int i,j=-n;++j<n;){for(i=0;i<n;i++)putchar(~(i+j)%2&i>=abs(j)?s[i]:' ');puts("");}

Even better. Notice that condition i * i>=j * j is same as i>=abs(j), but shorter. Let’s move puts() into for loop increment expression. And guess what? Actually, we don’t need the braces around i+j. 78 bytes:
for(int i,j=-n;++j<n;puts(""))for(i=0;i<n;i++)putchar(i*i>=j*j&~i+j?s[i]:' ');

Did you know that putchar() returns the character it has printed? Let’s use XOR to test numbers for equivalence. Let’s replace space with its ASCII code, 32. Remember that end-of-line character code is 13. And finally: did you know that GCC/Clang do support https://en.wikipedia.org/wiki/Elvis_operator ? 73 bytes:
for(int i,j=-n;++j<n;)for(i=0;putchar(i*i>=j*j&~i+j?s[i]?:13:32)^13;i++);

Finally, guess what? We don’t need two for loops. We can replace ugly ~i+j with just i-j. 70 bytes:
for(int i=1,j=1-n;i=putchar(j*j<i*i&i-j?s[i-1]?:13:32)^13?i+1:++j<n;);

Future work: change loop direction? This might save some bytes, if done properly.

SOGL V0.12, 13 10 9 bytes
ēI*@∑}¹╚H

This uses a feature that I just added, but was documented a while ago.
Try it here!
In that link , is added because this expects the input on the stack and { added because otherwise , would get executed every time in the loop
implicitly start loop over POP
ē            increase the variable E, on first push which will be 0
 I           increase by 1
  *          multiply the current character that many times
   @∑        join with spaces
     }     end loop
      ¹    wrap everything on stack in an array
       ╚   center vertically
        H  rotate counter-clockwise

Haskell, 73 bytes
f s|l<-length s-1=[zipWith min s$(' '<$[1..abs x])++cycle"~ "|x<-[-l..l]]

Try it online!

Python 2, 86 83 bytes
-3 thanks to officialaimm
lambda s,j=' '.join:map(j,zip(*(j(c*-~i).center(len(s)*2)for i,c in enumerate(s))))

Try it online!

83 bytes

Gaia, 16 bytes
$:ċ⟪×$§×⟫†€|$¦tụ

Try it online!
Explanation
$                 Split into list of chars
 :ċ               Push [1 .. len(input)]
   ⟪×$§×⟫†        Apply this block to corresponding elements of the two lists:
    ×              Repetition
     $             Split into chars
      §×           Join with spaces
          €|      Centre align the rows
            $¦    Split each line into chars
              t   Transpose
               ụ  Join each row with spaces, then join the rows together with newlines

Jelly, 15 bytes
;€⁶ṁ"JUz⁶ZUŒBZG

Try it online!

Octave, 59 63 58 57 bytes
@(s,a=@strjust)a([kron(+a(hankel(s)),[1 0;0 0]) '']',99)'

Try it online!

99: good idea :-)

Haskell, 140 137 bytes
(m#n)s=(\(i,x)->' ':(last$"  ":[x:" "|rem i 2==m&&i>n]))=<<zip[0..]s
g s=((++)=<<reverse.tail)$id=<<[[(0#n)s,(1#n)s]|n<-[-1,1..length s]]

Try it online!
Saved 3 bytes thanls to Challenger5
I don't think that's optimal...
f produces one of the lines (m = 0 or 1 is the modulo of the line number, n is the number of the line)
g intercalates "odd" and "even" lines, and add to the result a mirror of itself.

You can save bytes by defining f as an infix function (as in (m#n)s=...) rather than a prefix function.

C++, 135 bytes
Okay, here's my shot with C++:
auto f=[&](auto f,int y)->void{
  for(int i{};i<n;i++) putchar(y<0?f(f,y+1?i+1:n-1-i),'\n':i<y||i+y&1?' ':s[i]);
}; f(f,-1); f(f,-2);

Try It Online (ideone)!

Java, 292 bytes (sorry)
public class D{
public static void main(String[]r){
String s=r[0];int L=s.length(),n=L*2-1,x=L-1,d=-1,i,j;boolean a=false,o=L%2==1;
for(i=0;i<n;i++){
for(j=0;j<L;j++)System.out.print(j<x||a&&j%2==(o?0:1)||!a&&j%2==(o?1:0)?' ':s.charAt(j));
System.out.println();
x+=d;if(x<0){x=0;d=1;}a=!a;}}}

You can remove the newlines, otherwise, this looks pretty golfed!

You can golf more: 1. boolean a=1<0,o=L%2>0;. 2. If you don't need i, use this loop: for(i=0;i++<n;). 3. You can get rid of o: j%2<L%2 then j%2>L%2. 4. Using d as flip takes so many characters: just do j<(x<0?-x:x). 5. You have way more variables than needed. 6. You don't need a full program: a lambda or method is enough. -- If you want a golfed Java example, check my answer.

Haskell, 81 bytes
f s|l<-length s=[[last$' ':[s!!i|i>=n,mod(n+i)2<1]|i<-[0..l-1]]|n<-abs<$>[-l..l]]

Try it online!

Java (OpenJDK 8), 116 bytes
s->{for(int l=s.length(),i=-l;++i<l;)System.out.printf("%"+l+"s%n",s.substring(i<0?-i:i).replaceAll("(.).","$1 "));}

Try it online!
Explanation
s->{                                // Consumer<String> lambda
 for(int l=s.length(),i=-l;++i<l;)  // For each length between l and 1 and back to l,
  System.out.printf("%"+l+"s%n",    // Print with align to right
    s.substring(i<0?-i:i)           // skip the first |i| characters
     .replaceAll("(.).","$1 ")      // replace every even-positioned character with a space.
   );
}

Pyth, 25 bytes
j+_Km++*d;@Qdtj;%2>QdUQtK

Try it here.

Jelly, 18 bytes
JrLm€2Ṭ;€0a⁸o⁶ṚŒḄG

Try it online!

Mathematica 105 Bytes
(c=Characters@#;l=Length@c;StringRiffle@Table[If[Abs[j-l]<i&&EvenQ[j+i],c[[i]]," "],{j,1,2l+1},{i,1,l}])&

Maybe I could shave off another byte or two, but the character count overhead of dealing with strings in Mathematica makes simple challenges like this uncompetitive.

J, 54 bytes
[:|:|.@i.@#(>@],~' '#~[)"_1[:(,' '&,)/&.>>:@i.@#<@#"0]

Try it online! (note that the output on TIO has a newline and three spaces, but that isn't from the function call -- it's probably just what the J interpreter does automatically).
I think the general idea for solving this is right, but there are small things that I'm probably doing sub-optimally that are adding to the bytecount.
Previous variants
55 bytes
<:@+:@#{.[:|:|.@i.@#(],~' '#~[)"_1>:@i.@#(,' '&,)/@#"0]

56 bytes
<:@+:@#{.[:|:|.@i.@#(],~' '#~[)"_1#{.[:(,' '&,)//.[:]\.]

Explanation
This will be split into a few functions. Also, I wasn't as thorough with latter parts of the explanation, so let me know if you want a better explanation for a certain part and I can edit that in.
dup   =. >:@i.@# <@#"0 ]
space =. (,' '&,)/&.>
pad   =. |.@i.@# (>@],~' '#~[)"_1 ]
trans =. |:

dup duplicates each character as many times as its index (plus one) in the string
space inserts spaces between each character
pad pads the characters with the right amount of spaces
trans transposes the resulting matrix

Sample call:
   trans pad space dup 'abc'
  c
 b
a c
 b
  c

Dup
>:@i.@# <@#"0 ]
>:@i.@#         Indices of each character plus one
      #          Length of the string
   i.            Range [0,length)
>:               Add one
        <@#"0 ] Duplicate each character as many times as it index (plus one)
           "0   For each
          #   ]  Copy the character
>:@i.@#           as many times as it index
        <        Box the result

The results are boxed to prevent J from padding the ends with spaces (since they're of uneven length).
Sample call:
   dup 'abc'
┌─┬──┬───┐
│a│bb│ccc│
└─┴──┴───┘

Space
(,' '&,)/&.>
         &.>  For each boxed element
(,' '&,)/      Insert spaces between each

Sample call:
   space dup 'abc'
┌─┬───┬─────┐
│a│b b│c c c│
└─┴───┴─────┘

Pad
|.@i.@# (>@],~' '#~[)"_1 ]
        (>@],~' '#~[)      Pad the right arg with spaces given by the left arg
|.@i.@#                    Indices in reverse order
   i. #                     Range [0,length)
|.                          Reverse

Basically, pad the first element with length - 1 spaces, the second with length - 2, etc. It also removes the boxing.
Sample call:
   pad space dup 'abc'
  a
 b b
c c c

Transpose
This is just the built-in function |: which takes the transpose of a matrix.

I used a similar approach, but avoided boxing.  45 bytes: |:@(-@i.@-@#|."0 1((,@,.~' '#~#)@$"0~1+i.@#)).  it could surely be golfed further.  this part -@i.@-@# is some low hanging fruit, most likely

@Jonah I can't quickly decipher how your answer works, so I'll leave it to you to post it if you would like to, as I like to include an explanation of my answer. I guess J for me right now is a write-only language.

helpful for quickly deciphering: f=. <some tacit expression>, then 5!:2 <'f'gives a boxed visualization and 5!:4 <'f' gives a tree visualization.  in my case, try running $"0~1+i.@# with some string first, then run everything to the right of |."0 1, then understand that |."0 1 and everything to the left, save the final transpose, is just doing the necessary rotations.

@Jonah That's very useful, thanks! When I was looking for debugging resources, I found one that seemed deprecated (I at least couldn't load it or use the system function name it had) and sort of gave up there. However, my comment more speaks to my laziness than anything else (writing explanations for my own solutions is already nontrivial). Though doubtful, I may get to writing one tomorrow.

oh i wasn't expecting you to update your answer.  it was more of a "hey, you might find this interesting."  i could have posted it, but felt the high-level approaches were similar enough it wasn't worth it.

@Jonah Whoops, looks like that was a misunderstanding on my behalf. Glad you clarified.

@Jonah I golfed your solution a bit |:@((-#)|."_1,@(' '&,.)@$"0)~#\

Just remembered the complex arguments of # helps here, 26 bytes with |:@((-#)|."_1(1j1##)"0)~#\

@miles very nice.  another "TIL in J" brought to you by miles.

Perl 5, 86 + 2 (-F) = 88 bytes
Used @Dom's suggestions and a few of my own tweaks to lower the byte count.
for$k(0..$#F){$i=1;$a[$#F+$k]=$a[$#F-$k]=[map$i++<$k|($i+$k)%2?$":$_,@F]}say"@$_"for@a

Try it online!

Sorry about that, glad you got your answer out there though! Had a little bit of a play when I was trying to fix mine and coudnl't get a solution down, yours was a better approach! It is possible to drop a couple of bytes using -aF to put all the letters in @F and a couple of little tweaks (-F counts as 3 since it needs a space after): Try it online!

Why does -F count as 3?  Shouldn't it be 2 at the most?  Isn't it the difference between perl -e'code...' and perl -eF 'code...'.  Also -a is unnecessary when using -F, so that byte can be cut.

That's it exactly. So -F accepts an argument, but we don't wanna pass one in (-F allows us to control what -a splits on, no argument, split each char on its own) so it's the difference between perl -ae '...' and perl -aF -e '...'. By default -a splits on /\s+/. Hope that helps clarify!

Also, nice use of $#F! Always forget about that!

JavaScript (ECMAScript 6), 161 bytes
(s,n=console.log)=>s.split("").map((q,i,a,p)=>n(p=" ".repeat(q=a.length-++i)+a.map((v,j)=>j>=q&&j%2==q%2?a[j]+' ':'').join(''))||p).reverse().map((v,i)=>i&&n(v))

Try it online!

q/kdb+, 55 bytes
Solution:
-1(+){{1_a,((2*y)#" ",z),a:x#" "}'[(|)c;1+c:(!)(#)x]x};

Example:
q)-1(+){{1_a,((2*y)#" ",z),a:x#" "}'[(|)c;1+c:(!)(#)x]x}"Hello World";
          d
         l
        r d
       o l
      W r d
       o l
    o W r d
   l   o l
  l o W r d
 e l   o l
H l o W r d
 e l   o l
  l o W r d
   l   o l
    o W r d
       o l
      W r d
       o l
        r d
         l
          d

Explanation:
TODO. ungolfed version is 66 bytes:
-1 flip{{1_a,((2*y)#" ",z),a:x#" "}'[reverse c;1+c:til count x]x};

Bonus:
To get the same output as the example (74 bytes):
q)-1(+){1_'raze{(a,((2*y)#" ",z),a:x#" ";(2*y+x)#" ")}'[(|)c;1+c:(!)(#)x]x}"Hello World";
                    d
                  l
                r   d
              o   l
            W   r   d
              o   l
        o   W   r   d
      l       o   l
    l   o   W   r   d
  e   l       o   l
H   l   o   W   r   d
  e   l       o   l
    l   o   W   r   d
      l       o   l
        o   W   r   d
              o   l
            W   r   d
              o   l
                r   d
                  l
                    d


text:
Print the roots of a quadratic equation
Write a program or function that takes in a quadratic equation and prints its factorized roots. The input can be taken in from any reasonable source, such as a function parameter, stdin, or a command line argument.
Edit: This is not intended to be a duplicate of other quadratic equation questions. While others simply provide the integers of the equation and expect integer answers, this question is more about parsing the input string and printing an output string of the exact appropriate form.
Input
Input will be either a string or an array of characters, and it will be of the form ax^2 + bx + c, where a, b, and c are integers. The input will always be exactly of this form, whether the integers are positive, negative, or 0.
Output
Output will be a string (or array of characters) of the form (x - d)(x - e) where d and e are the roots of the equation. You may assume that input will have exactly 2 rational roots.
Test Cases
1x^2 + 6x + 9 => (x - -3)(x - -3)
1x^2 + 0x + -16 => (x - 4)(x - -4)
3x^2 + -9x + -12 => (x - -1)(x - 4)
Note: this last example is not an equality as the factor of 3 is missing. Imaginary bonus points if you include the factor, but it is not necessary.
Scoring
This is code golf, so shortest answer in bytes wins.
Bonus
If your submission can handle the following restrictions, your score will be halved.

If b or c in the input are negative, it will be represented with a minus, i.e. ax^2 + -bx + -c will instead be represented as ax^2 - bx - c
If a, b, or c are 1, they will be omitted. If they are 0, the whole value will be omitted. i.e. 1x^2 + 0x + -16 will be represented as x^2 - 16
The same rules apply to output; x^2 + 5x must produce exactly (x)(x + 5) or (x + 5)(x)

@totallyhuman This is similar, but that question is about the math involved. My intent with this question is more about parsing the input and producing an output of the correct format. Please let me know if there is anything I can change to make that more clear. Thanks!

I would suggest removing the bonuses - people usually don't want to take the time to figure out if the bonus will save them bytes or not. Figure out which parts are required, and which aren't. That said, with your comment RE I/O, I am voting to reopen.

I/O restrictions are usually discouraged and if you remove that, this is the same task as the dupe.

@totallyhuman Understood. This is my first question on PPCG so I wasn't sure exactly how it would go over. Thanks for the feedback!

Ah, getting a challenge right the first time is pretty hard. ;) You should try to use the Sandbox, where people should help iron out the problems and check if it's a dupe.

@totallyhuman I/O restrictions are usually discouraged because they make the challenge about the I/O more than the challenge. However, in this challenge, the I/O is the focus of the challenge. Therefore, it should be kept.

@StepHen At that point, this challenge would be a chameleon challenge. Which means it appears to be about finding the roots but is actually about the I/O. In either case, the result is discouraged.

@totallyhuman it can't really be a chameleon when the OP says My intent with this question is more about parsing the input and producing an output of the correct format. - then it's about both (IMO)

Related.

source: Stack Exchange

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

sort: votes


text:
Divisibility Streak
We can define the Divisibility Streak k of a number n by finding the smallest non-negative integer k such that n+k is not divisible by k+1.
Challenge
In your language of choice, write a program or function that outputs or returns the Divisibility Streak of your input.
Examples:
n=13:
13 is divisible by 1
14 is divisible by 2
15 is divisible by 3
16 is divisible by 4
17 is not divisible by 5

The Divisibilty Streak of 13 is 4
n=120:
120 is divisible by 1
121 is not divisible by 2

The Divisibilty Streak of 120 is 1
Test Cases:
n      DS
2      1
3      2
4      1
5      2
6      1
7      3
8      1
9      2
10     1
2521   10

More test cases can be found here.
Notes

Based on Project Euler Problem 601
This sequence can be found on OEIS, shifted down by 1.

Rules

You can assume the input is greater than 1.

Scoring
code-golf:The submission with the lowest score wins.

I suggest changing "smallest positive integer" to "smallest nonnegative integer". It doesn't change the challenge at all, but with the current description, it implies we don't need to check for divisibility by 1 (which we technically shouldn't need to). Either that, or you could remove the divisibility by 1 checks from the description.

The smallest positive integer is 1, and k + 1 is 2, where k is the smallest positive integer. Sorry for the nitpick.

Isn't this the same as finding the smallest k which doesn't divide n-1?

@PaŭloEbermann Take n=7 where k=3: n-1 is divisible by k.

Ah, I missed the +1.

Pyth, 6 5 bytes
f%tQh

Try it online!

Java 8, 44 42 41 39 bytes
Crossed out 44 is still regular 44 ;(
n->{int r=0;for(;~-n%--r<1;);return~r;}

-2 bytes thanks to @LeakyNun.
-1 byte thanks to @TheLethalCoder.
-2 bytes thanks to @Nevay.
Explanation:
Try it here.
n->{                 // Method with integer as parameter and return-type
  int r=0;           //  Result-integer (starting at 0)
  for(;~-n%--r<1;);  //  Loop as long as `n-1` is divisible by `r-1`
                     //   (after we've first decreased `r` by 1 every iteration)
  return~r;          //  Return `-r-1` as result integer
}                    // End of method

42 bytes

41 bytes Just shaved a byte from LeakyNun's suggestion.

39 bytes

Haskell, 35 bytes
f n=[k|k<-[1..],rem(n+k)(k+1)>0]!!0

Try it online!
Using until is also 35 bytes
f n=until(\k->rem(n+k)(k+1)>0)(+1)1

Husk, 7 bytes
ḟ§%→+⁰N

Try it online!

05AB1E, 7 6 bytes
Ý+āÖ0k

Try it online!
Alternate 7 byte solutions:
<DLÖγнg
Ls<ÑKн<

APL (Dyalog Unicode), 16 14 13 bytes
⊃∘⍸⍳(×+∘×|+)⊢

-1b thanks to Adám
Try it online!
Previous solution made tacit (i.e. using trains)

{⊃⍸×(1+⍳⍵)|⍵+⍳⍵}

Try it online!
Only my second APL answer so I'm sure it can be golfed further!
Justification for only searching up to 2n is due to Bertrand's Postulate which states that for any n>3, there exists a prime number between n and 2^n-2. Since by definition a prime only has factors of itself and 1, it will always terminate the divisibility streak.
Explanation
{⊃⍸×(1+⍳⍵)|⍵+⍳⍵}  ⍝
{              }  ⍝ dfn, in this case taking a single argument (e.g. 13) mapped to ⍵
             ⍳⍵   ⍝ computes array of digits 0,1,2,3,4...,12
           ⍵+     ⍝ adds the original argument to each element of this array - 13,14,15,16...25
    (1+⍳⍵)        ⍝ computes a new array from 1...13
          |       ⍝ applies modulo to elements at the same index across the two arrays, e.g. 13%1,14%2,15%3,16%4,17%5...26%14 = 0 0 0 0 2...12
   ×              ⍝ converts any number >1 to 1, e.g. 0 0 0 0 1...1
  ⍸               ⍝ find the index of all 'true's. e.g. 4 6 7 8 9 10 12 13
 ⊃                ⍝ take the first, e.g. 4

-1: ⊃∘⍸⍳(×+∘×|+)⊢ Try it online!

JavaScript (ES6), 28 bytes
n=>g=(x=2)=>++n%x?--x:g(++x)

Test it

o.innerText=(f=

n=>g=(x=2)=>++n%x?--x:g(++x)

)(i.value=2521)();oninput=_=>o.innerText=f(+i.value)()
<input id=i><pre id=o>

Perl 5, 23 21 + 1 (-p) = 22 bytes
1until$_++%++$\}{$\--

Try it online!

Mathematica, 30 27 bytes
0//.i_/;(i+1)∣(#+i):>i+1&

An unnamed function that takes an integer argument.
Try it on Wolfram Sandbox
Usage:
0//.i_/;(i+1)∣(#+i):>i+1&[2521]

10

Python 2, 35 bytes
f=lambda n,x=1:n%x<1and-~f(n+1,x+1)

Try it online!

K (oK), 23 15 bytes
#1_(~!/)(1+)\1,

Try it online!
Explanation:
(~!/)(1+)\1, / the solution
          1, / prepend 1 to input
     (1+)\   / iterate, increasing by 1
(~!/)        / until the modulo (!) is not (~) zero

-8 bytes thanks to @Traws!

15 bytes with #1_(~!/)(1+)\1,

Python 2, 43 41 bytes
Saved 2 bytes thanks to Leaky Nun!
i=input();k=1
while~-i%-~k<1:k+=1
print k

Try it online!
Python 2, 40 bytes
f=lambda i,k=1:~-i%-~k<1and f(i,k+1)or k

Try it online!

41 bytes

Cubix, 17 bytes
)uUqI1%?;)qUO(;/@

Try it online!
Cubified
    ) u
    U q
I 1 % ? ; ) q U
O ( ; / @ . . .
    . .
    . .

I1 setup the stack with input and divisor
%? do mod and test

;)qU)uqU if 0 remove result and increment input and divisor.   Bit of a round about path to get back to %
/;(O@ if not 0, drop result, decrement divisor, output and exit

Watch it run

Japt -æ, 9 8 7 5 bytes
N°u°U

Try it
Original (w/o flag), 7 bytes
@°uXÄ}a

Test it

Explanation
Implicit input of integer U.
@     }a

Return the first integer that returns a truthy value (a number >0) when passed through a function (with X being the current integer)  ...
°

That postfix increments U ...
uXÄ

And modulos it (u) by X+1.

I wish U got auto-added after the @ here, but it doesn't do that on + and -. Bummer. Maybe we should request it gets auto-added when followed by ++ or --

Python 2, 44 40 bytes
-4 bytes thanks to Leaky Nun.
f=lambda n,x=1:~-n%-~x and x or f(n,x+1)

Try it online!

40 bytes

C# (Mono), 41 39 bytes
n=>{int r=0;while(~-n%--r<1);return~r;}

Essentially a port of @Kevin Cruijssen's Java 8 answer with further golfing.
Try it online!

Swift 4, 56 bytes
This is a full function f, with an integer parameter i that prints the output.
func f(i:Int){var k=0;while(i-1)%(k+1)<1{k+=1};print(k)}

Try it here.
Swift 4, 56 bytes
This is an anonymous function, that returns the result.
{var k=0;while($0-1)%(k+1)<1{k+=1};return k}as(Int)->Int

Try it here.
Check out the Test Suite!

Ruby, 34 32 31 bytes
f=->n,d=1{n%d<1?1+f[n+1,d+1]:0}

A recursive lambda. Still new to Ruby, so suggestions are welcome!
Try it online!

dc, 28 bytes
1si[1+dli1+dsi%0=M]dsMxli1-p

Try it online!
This feels really suboptimal, with the incrementing and the final decrement, but I can't really see a way to improve on it. Basically we just increment a counter i and our starting value as long as value mod i continues to be zero, and once that's not true we subtract one from i and print.

Gaia, 8 bytes
@1Ė₌)†↺(

Try it online!
Explanation
@         Push input (call it n).
 1        Push 1 (call it i).
      ↺   While...
  Ė₌       n is divisible by i:
    )†     Increment both n and i.
       (  Decrement the value of i that failed this test and print.

J, 17 bytes
[:{.@I.>:@i.|i.+]

Try it online!
I think there's still room for golfing here.
Explanation (ungolfed)
[: {.@I. >:@i. | i. + ]
                 i. + ]  Range [n,2n)
                 i.       Range [0,n)
                    +     Added to each
                      ]   n
         >:@i. | i. + ]  Divisibility test
         >:@i.            Range [1,n+1)
               |          Modulo (in J, the arguments are reversed)
                 i. + ]   Range [n,2n)
    {.@I.                Get the index of the first non-divisible
       I.                 Indices of non-zero values
    {.                    Head

The cap ([:) is there to make sure that J doesn't treat the last verb ({.@I.) as part of a hook.
The only sort of weird thing about this answer is that I. actually duplicates the index of each non-zero number as many times as that number's value. e.g.
   I. 0 1 0 2 3
1 3 3 4 4 4

But it doesn't matter since we want the first index anyways (and since i. gives an ascending range, we know the first index will be the smallest value).
Finally, here's a very short proof that it is valid to check division only up to n.
We start checking divisibility with 1 | n, so assuming the streak goes that far, once we get to checking divisibility by n we have n | 2n - 1 which will never be true (2n - 1 ≡ n - 1 (mod n)). Therefore, the streak will end there.

0{[:I.>:@i.|i.+] to save one byte.  The alternative I came up with independently before noticing your answer, also 16: 0{]I.@(>:@]|+)i..  Includes test cases

@Jonah I must admit, it’s been a while since I wrote this answer. I’d have no qualms with you posting that as its own answer, seeing as you came up with it independently.

PHP, 34 bytes
for(;$argv[1]++%++$r<1;);echo$r-1;

Try it online!
Simple enough. Checks the remainder of division (mod) each loop while incrementing each value, outputs when the number isn't divisible anymore.

Japt, 7 bytes
õ b!%UÉ

Test it online!

x86 Machine Code, 16 bytes
49                 dec    ecx        ; decrement argument
31 FF              xor    edi, edi   ; zero counter

                Loop:
47                 inc    edi        ; increment counter
89 C8              mov    eax, ecx   ; copy argument to EAX for division
99                 cdq               ; use 1-byte CDQ with unsigned to zero EDX
F7 FF              idiv   edi        ; EDX:EAX / counter
85 D2              test   edx, edx   ; test remainder
74 F6              jz     Loop       ; keep looping if remainder == 0

4F                 dec    edi        ; decrement counter
97                 xchg   eax, edi   ; move counter into EAX for return
C3                 ret               ;  (use 1-byte XCHG instead of 2-byte MOV)

The above function takes a single parameter, n, in the ECX register. It computes its divisibility streak, k, and returns that via the EAX register. It conforms to the 32-bit fastcall calling convention, so it is easily callable from C code using either Microsoft or Gnu compilers.
The logic is pretty simple: it just does an iterative test starting from 1. It's functionally identical to most of the other answers here, but hand-optimized for size. Lots of nice 1-byte instructions there, including INC, DEC, CDQ, and XCHG. The hard-coded operands for division hurt us a bit, but not terribly so.
Try it online!

Jelly, 7 bytes
Ḷ+%RTḢ’

Try it online!
Explanation:
Ḷ+%RTḢ’  main link, argument: n
Ḷ+       [n, 2n-1]
   R     [1, n]
  %      modulo
    TḢ   index of first truthy value (first value where k+1 does not divide n+k), 1-indexed
      ’  decrement

Befunge, 19 bytes
#v_1+::&+1-\%
1<@.-

Try it online!

Keg, 17 bytes
®n0&{©n⑻+⑹⑻%0=|}⑺

Try it online!

K4, 27 25 bytes
Solution:
*(1+)/[{y=x*_y%x}. 1+;]1,

Explanation:
Pretty naive. Start with list of [1, x] and increment both until no longer divisible.
*(1+)/[{y=x*_y%x}. 1+;]1, / the solution
                       1, / prepend input with 1
 (  )\[              ;]   / (loop)\[condition;start]
       {        }.        / lambda taking implicit x & y
                   1+     / add 1 (vectorised) [1, 13] => [2, 14]
             y%x          / divide y by x
            _             / floor
          y*              / multiply by x
        y=                / equals y?
  1+                      / add 1 (vectorised) [1, 13] => [2, 14]
*                         / take first [2, 14] => 2

PowerShell Core, 30 bytes
for(;!($args[0]++%++$i)){}$i-1

Try it online!

Vyxal, 7 bytes
?+n›%)Ṅ

Try it online!
Explanation:
     )   # Lambda f from beginning of program
      Ṅ  # First non-negative integer n such that f(n) is truthy
?        # Push the input
 +       # Add n to it
    %    # Modulo
  n›     # N incremented

><>, 20 bytes
0\1-n;
?\1+:@$:1+}$%

Try it online!

Pyt, 14 bytes
ĐřĐ0↔⁻⇹|¬*ž↓⁻+

Try it online!
Determines the first positive integer that does not divide \$n-1\$.
Đ                   implicit input; Đuplicate
 ř                  řangify
  Đ                 Đuplicate
   0                push 0 (so the next action will work properly)
    ↔               flip the stack
     ⁻              decrement
      ⇹             swap top two items
       |¬           divisibility test; negate
         *ž↓        multiply element-wise, remove žeros, get minimum
            ⁻       decrement
             +      add to get rid of pesky 0; implicit print

Arturo, 32 bytes
$[n][1while[0=%n-+1<=<=][+1]dec]

Try it

Nibbles, 5.5 bytes
?,~~%+@$+$~

Attempt This Online!
? Find the index of the first item
,  in the numbers from 1 to
~   infinity
~  such that the result of the following is positive
%   modulo
+    add
@     the input
$     the number
+    add
$     the number
~     1

Thunno 2, 5 bytes
Ƙ+n⁺%

Try it online!
Explanation
Ƙ+n⁺%  # Implicit input
Ƙ      # Find the first positive integer, n, such that:
 +     #  input + n
    %  #  mod
  n⁺   #  n + 1
       #  is truthy (non-zero)
       # Implicit output

SOGL V0.12, 8 bytes
]e.-ē⁴I\

Try it Here!
Not bad for a language which is made for a completely different type of challenges.
Explanation:
]         do .. while top of the stack is truthy
 e          push the variable E contents, by default user input
  .-        subtract the input from it
    ē       push the value of the variable E and then increase the variable
     ⁴      duplicate the item below one in the stack
      I     increase it
       \    test if divides
            if it does divide, then the loop restarts, if not, outputs POP which is `e-input`

Mathematica, 40 bytes
Min@Complement[Range@#,Divisors[#-1]-1]&

Try it online! (Mathics)
Mathematical approach, n+k is divisible by k+1 if and only if n-1 is divisible by k+1. And n-1 is not divisible by n, so Range@# is enough numbers.
Originally I intend to use Min@Complement[Range@#,Divisors[#-1]]-1&, but this also work.

Why does the captcha appear when I use the submission from tio?

Because you typed (copied-and-pasted) it too quickly. It isn't about TIO.

Julia 0.6.0 (47 bytes) (38 bytes)
n->(i=1;while isinteger(n/i) i+=1;n+=1 end;i-1)
n->(i=1;while n%i<1 i+=1;n+=1end;i-1)
Try it online!
9 bytes were cut thanks to Mr.Xcoder

Normally a "Try it online" link allows people to actually try the code by defining some combination of header, footer, and arguments which mean that pressing the play button gives output.

@PeterTaylor By a pure guess, I tried running it as such, and to my  surprise it worked. I recommend the OP to edit in with the testable version.

46 bytes (removing one space): n->(i=1;while isinteger(n/i) i+=1;n+=1end;i-1)

Another pure guess allowed be to golf it down to 38 bytes: n->(i=1;while n%i<1 i+=1;n+=1end;i-1)

@PeterTaylor Sorry forgot it!

C (gcc), 34 bytes
i;f(n){for(i=1;++n%++i<1;);n=i-1;}

Try it online!

Suggest i-- instead of n=i-1

F#, 86 bytes 84 bytes
let s n =
    let rec c n1 d r=if n1%d=0 then c(n1+1)(d+1)(r+1)else r
    c n 1 0

Try it online!
Edit: -2 characters from Oliver

Welcome to PPCG! Does your program take stdin? You can use TIO, which has an online F# interpreter. Also, can remove the whitespace in r = if?

@Oliver Thank you, I changed the link to TIO, so now you can actually pass the argument to test it. :)

Batch, 70 bytes
@set/an=%1-1,i=0
:l
@set/ai+=1,r=n%%~i
@if %r%==0 goto l
@echo %i%

All this is doing is finding the largest i such that LCM(1..i) divides n-1.

R, 43 37 bytes
n=scan();which((n+1:n)%%(1:n+1)>0)[1]

Try it online!

Aceto, 28 27 bytes
[;`%
I)@]
iIk2I(D(
rk[(&Xpu

I could save one byte if I don't have to exit.
Explanation:
We use three stacks: The left stack holds a counter starting at 2, the right one holds the given number (or its increments), the center stack is used for doing the modulo operations. We could, of course, do everything in one stack, but this way we can set the outer stacks to be "sticky" (values that are popped aren't really removed) and save ourselves many duplication operations. Here's the method in detail:
Read an integer, increment it, make the current stack sticky, and "move" it (and ourselves) to the stack to the left:
iI
rk[

Go one more stack to the left, push a literal 2, make this stack sticky, too. Remember this position in the code (@), and "move" a value and ourselves to the center stack again.
  @]
  k2
   (

Now we test: Is the modulo of the top two numbers not 0? If so, jump to the end, otherwise go one stack to the right, increment, and push the value and us to the middle. Then go to the left stack, increment it, too, and jump back to the mark that we set before.
[;`%
I)
    I(
    &

When the result of the modulo was not zero, we invert the position the IP is moving, go one stack to the left (where our counter lives), decrement it, and print the value, then exit.
      D(
     Xpu

Actually, 13 bytes
╗1⌠u;u@╜+%⌡╓u

Try it online!
Explanation:
╗1⌠u;u@╜+%⌡╓u
╗              save n to register 0
 1⌠u;u@╜+%⌡╓   first k (starting with k=0) where the following is truthy:
   u             k+1
    ;u@╜+        n+k+1
         %       (n+k+1)%(k+1)
            u  increment

APL (Dyalog Unicode), 11 bytes
⊥⍨∘⌽0=⍳|-∘1

Try it online!
Uses the alternative representation: the highest k such that 1..k divides n-1.
How it works
⊥⍨∘⌽0=⍳|-∘1  ⍝ Input: n
        -∘1  ⍝ n minus 1
    0=⍳|     ⍝ Is divisible by 1..n?
⊥⍨∘⌽         ⍝ Count the leading ones

"Count leading ones" idiom can be found on APLcart.

Brachylog, 10 bytes
∧.ℕ+↙?f-₁ⁿ

Try it online!
 .            The output
∧             (which isn't necessarily the input)
  ℕ           is a non-negative integer, and
      f       the factors of
   +↙?        it plus the input
       -₁ⁿ    do not contain the output plus 1.

JavaScript (V8), 27 bytes
(n,i=2)=>n%i^1?--i:f(n,++i)

Try it online!

asm2bf, 74 bytes
Try it online!
I/O format: In most cases, it's ASCII, yet some interpreters will output numbers in decimal representation. That's why the test case has 1 return 4 => because in fact, ASCII(1) is 49.
Golfed:
in r1
incr2
@l
movr3,r1
modr3,r2
ceqr3,0
cadr1,1
cadr2,1
cjn%l
decr2
outr2

Commented version:
; Read the number from the standard input.
in r1

; We start the division with 1.
inc r2

@l
    ; r3 = r1 mod r2
    mov r3, r1
    mod r3, r2

    ; if r3 is zero, then the streak
    ; isn't over.
    ceq r3, 0

    ; Pass around next number and divisor.
    cad r1, 1
    cad r2, 1

    ; Loop
    cjn %l

; Display the final result (it's always off-by-one), yet a dec fixes it.
dec r2
out r2

Ruby, 39 bytes
->x{1.step{|i|break i-1if x%i!=0;x+=1}}

Try it online!

F#, 64 bytes
let d n=
 let mutable m,l=n,1
 while m%l=0 do m<-m+1;l<-l+1
 l-1

Try it online!
Simple explanation:
let divisibilityStreak n = // Arg: 'n'
 let mutable l = 1         // For increase the 'divisible' number
 let mutable n2 = n        // Another one for storing mutable 'n'
 while n2 % l = 0 do       // While 'n' is divisible by 'l',
  n2 <- n2 + 1             // Add 1 to both 'n2' (mutable 'n')...
  l <- l + 1               // and 'l'
 l - 1                     // Finally, return 'l - 1'

jq, 34 bytes
. as$x|0|until((.+$x)%(1+.)>0;.+1)

Try it online!

jq, 40 bytes
[range(.)as$x|(.+$x)%(1+$x)<1//-$x]|-max

Try it online!

TI-Basic, 19 21 bytes
Input N
Repeat remainder(N+Ans,Ans+1
Ans+1
End
Ans

Output is stored in Ans and displayed. This only works on TI-84+/SE with the 2.53 MP OS. The below version is 2 bytes bigger but works on earlier OS's.

21 23 bytes
Input N
Repeat fPart((N+Ans)/(Ans+1
Ans+1
End
Ans

Fig, \$10\log_{256}(96)\approx\$ 8.231 bytes
Lt@!%mCG@}

Try it online!
Argh y'all's "first number satisfying f" builtins.
Lt@!%mCG@}
       G@} # Generate an infinite list of numbers by incrementing the input
    %      # Modulo each in that list by
     mC    # [1, 2, 3, 4, ...]
 t@        # Take while
   !       # The number is 0
L          # Length of the resulting list

Risky, 7.5 bytes
0+0+0+0??+?\?+1

Try it online!
Risky happens to be very good (for its own standards) at this specific problem.
0+0+0+0??+?\?+1
       ?        Find the
0+0+0+0         first
                number such that
        ?       (the number
         +       plus
          ?      the input)
           \    modulo
            ?   (the number
             +   plus
              1  1)
                is non-zero

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

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


text:
Filter out the pseudo-elements!
We define the hyper-average of an array / list (of numbers) the arithmetic mean of the sums of its prefixes.
For example, the hyper-average of the list [1, 4, -3, 10] is computed in the following manner:

We get the prefixes: [1], [1, 4], [1, 4, -3], [1, 4, -3, 10].
Sum each: [1, 5, 2, 12].
And now get the arithmetic mean of the elements in this list: (1 + 5 + 2 + 12) / 4 = 5.

A pseudo-element of an array is an element whose value is strictly lower than its hyper-average. Hence, the pseudo-elements of our example list are 1, 4 and -3.

Given a list of floating-point numbers, your task is to return the list of pseudo-elements.

You don't have to worry about floating-point inaccuracies.
The input list will never be empty and it may contain both integers and floats. If mentioned, integers may be taken as floats (with <integer>.0)
You may assume that the numbers fit your language of choice, but please do not abuse that in any way.
Optionally, you may take the length of the array as input as well.
This is code-golf, so standard rules for the tag apply. The shortest code in bytes (in each language) wins!

Test Cases

Input -> Output

[10.3] -> []
[5.4, 5.9] -> [5.4, 5.9]
[1, 4, -3, 10] -> [1, 4, -3]
[-300, -20.9, 1000] -> [-300, -20.9]
[3.3, 3.3, 3.3, 3.3] -> [3.3, 3.3, 3.3, 3.3]
[-289.93, 912.3, -819.39, 1000] -> [-289.93, -819.39]

If some languages are allowed to take the length of the array as additional input, then it should be allowed for all languages.

@ngenisis It is for all languages. If taking the length as well shortens your program, feel free to do it. That spec isn't language restrictive at all.

05AB1E, 9 8 bytes
-1 bytes thanks to Magic Octopus Urn
ηOO¹g/‹Ï

Try it online!
η        # Get prefixes
 O       # Sum each
  O¹g/   # Get the mean ( length(prefix list) equals length(original list) )
      ‹Ï # Keep only the value that are less than the mean

05AB1E, 6 bytes
Using the new ÅA command.
ηOÅA‹Ï

Try it online!
η      # Get prefixes
 O     # Sum each
  ÅA   # Get the mean
    ‹Ï #  Keep only the value that are less than the mean

ηOO¹g/›Ï for 8; also it starts with nOO!.

MATL, 8 bytes
ttYsYm<)

Try it online! Or verify all test cases.
Explanation
tt    % Implicitly input array. Duplicate twice
Ys    % Cumulative sum
Ym    % Arithmetic mean
<     % Less than? (element-wise). Gives an array containing true / false
)     % Reference indexing : use that array as a mask to select entries
      % from the input. Implicitly display

Japt v2.0a0 -f, 12 11 10 9 bytes
<Wå+ x÷Wl

Try it
-1 byte thanks to ETH pointing out a redundant character.
<Wå+ x÷Wl     :Implicit filter of each element in input array W
<             :Is less than
 Wå+          :  Cumulatively reduce W by addition
     x        :  Reduce by addition
      ÷Wl     :  Divide by length of W

Python 3 with Numpy, 48 bytes
lambda x:x[x<mean(cumsum(x))]
from numpy import*

Input and output are Numpy arrays. Try it online!

+1 Finally, someone uses cumsum!

Husk, 10 9 bytes
Thanks @Zgarb for golfing off 1 byte!
f</L⁰Σ∫⁰⁰

Try it online!
Ungolfed/Explanation
           -- argument is ⁰ (list)
f       ⁰  -- filter the original list with
 <         --   element strictly smaller than
     Σ∫⁰   --   sum of all prefixes
  /L⁰      --   averaged out

f</L⁰Σ∫⁰⁰ is 9 bytes, but three lambda arguments feels clunky.

Haskell, 39 bytes
f l=filter(<sum(scanl1(+)l)/sum(1<$l))l

Try it online!
Unfortunately length is of type Int, so I cannot use it with floating point division / and I have to use a workaround: sum(1<$l).

Java 8, 81 bytes
This lambda expression accepts a List<Float> and mutates it. The input list's iterator must support removal (ArrayList's does, for example). Assign to Consumer<List<Float>>.
a->{float l=0,t=0,u;for(float n:a)t+=n*(a.size()-l++);u=t/l;a.removeIf(n->n>=u);}

Ungolfed lambda
a -> {
    float l = 0, t = 0, u;
    for (float n : a)
        t += n * (a.size() - l++);
    u = t / l;
    a.removeIf(n -> n >= u);
}

Try It Online
Acknowledgments

-3 bytes thanks to Kevin Cruijssen
-17 bytes thanks to Nevay

You can save 3 bytes by removing t/=l; and change if(n<t) to if(n<t/l).

You can use a list instead of an array to be able to modify the provided argument rather than printing the resulting values a->{float l=0,t=0,u;for(float n:a)t+=n*(a.size()-l++);u=t/l;a.removeIf(n->n>=u);} (81 bytes).

Jelly, 9 bytes
+\S÷L<Ðf@

Try it online!

Maybe <Ðf@ should instead be <Ðḟ@?

@EriktheOutgolfer but it passes all the testcases.

Still something doesn't seem good to me...first of all +\S÷L calculates the hyper-average, then <Ðf@ puts it as its right argument and < will return 1 if an element is a pseudo-element, essentially filtering for the pseudo-elements instead of filtering them out.

@EriktheOutgolfer In this context, filtering out means filtering for.

Python 2, 78 76 71 66 bytes
-7 bytes thanks to Mr. Xcoder.
lambda l:[x for x in l if x<sum(sum(l[:i])for i in range(len(l)))]

Try it online!

I think you can do range(len(l)) and l[:i+1] for -2 bytes (not tested)

Golfed and obfuscated. ;) Thanks!

Your solution is invalid though. Change x>sum(...) to x<sum(...) for it to be valid, still 76 bytes

Wherps... Fixed. >.>

I am surprised no one chose the obvious <s>68</s> 66 byte solution :P

Pshh, list comprehension/filter... :P Thanks!

JavaScript (ES6), 56 55 52 bytes
a=>a.filter(x=>x<t/a.length,a.map(x=>t+=s+=x,s=t=0))

Test it

o.innerText=(f=

a=>a.filter(x=>x<t/a.length,a.map(x=>t+=s+=x,s=t=0))

)(i.value=[1,4,-3,10]);oninput=_=>o.innerText=f(i.value.split`,`.map(eval))
<input id=i><pre id=o>

Perl 6, 31 bytes
{.grep(flat([\,] $_).sum/$_>*)}

Try it online!

R, 31 bytes
function(l)l[l<mean(cumsum(l))]

Try it online!

C# (Mono), 95 bytes
using System.Linq;a=>a.Where(d=>d<new int[a.Length].Select((_,i)=>a.Take(i+1).Sum()).Average())

Try it online!

Python 3, 76 bytes
lambda x:[w for w in x if w<sum(u*v+v for u,v in enumerate(x[::-1]))/len(x)]

Input and output are lists of numbers. Try it online!
This works in Python 2 too (with the obvious replacement for print syntax in the footer).

Do you need to reverse the list?

@officialaimm I think so, because enumeration values 1,2,3,...  must go with x[0], x[-1], x[-2]. But in all cases the result seems to be the same, hmm...

I found a counterexample which shows that reversing is indeed necessary

Ah, never mind.. I just thought so because it passed all the test cases... :P

Python 3, 72 bytes
lambda x:[*filter((sum(-~a*b for a,b in enumerate(x))/len(x)).__gt__,x)]

Try it online!

Very clever solution! I never thought filter would win over the usual list comprehension.

Mathematica, 35 bytes
Cases[#,x_/;x<#.Range[#2,1,-1]/#2]&

Function which expects a list of numbers as the first argument # and the length of the list as the second argument #2. #.Range[#2,1,-1]/#2 takes the dot product of the input list # and the the list Range[#2,1,-1] == {#2,#2-1,...,1}, then divides by the length #2. Then we return the Cases x_ in the input list # which are less than the hyper-average.
Without the length as a second argument, we need 6 more bytes:
Cases[#,x_/;x<#.Range[h=Tr[1^#],1,-1]/h]&

Pyth - 10 bytes
<#.OsM._QQ

Try it online here.

TI-Basic, 9 bytes
Ans*(Ans<mean(cumSum(Ans

Factor, 36 bytes
[ dup cum-sum mean '[ _ < ] filter ]

Try it online!
Explanation:
It's a quotation (anonymous function) that takes a sequence from the data stack as input and leaves a sequence on the data stack as output. Assuming { 1 4 -3 10 } is on the data stack when this quotation is called...

dup Duplicate an object.
Stack: { 1 4 -3 10 } { 1 4 -3 10 }

cum-sum Take the cumulative sum.
Stack: { 1 4 -3 10 } { 1 5 2 12 }

mean Take the mean.
Stack: { 1 4 -3 10 } 5

'[ _ < ] filter Take the elements from a sequence that are less than the number on top of the stack.
Stack: { 1 4 -3 }

Pyth, 12 11 bytes
f<T.OsM._QQ

-1 byte thanks to Mr. Xcoder
Try it online!

11 bytes: f<T.OsM._QQ

You can replace f<T with <# to save a byte. This may have been added to Pyth after this answer was posted, not sure.

Perl 5, 51 + 1 (-a) = 52 bytes
$a+=$_*(@F-$c++)for@F;for(@F){print$_,$"if$_<$a/@F}

Try it online!

PHP, 84 bytes
for($i=--$argc;$i;)$s+=$i--/$argc*$r[]=$argv[++$k];foreach($r as$x)$x<$s&&print$x._;

takes input from command line arguments. Run with -nr or try it online.

summing up the partial lists is the same as summing up each element multiplied with the number of following elements +1 → no need to juggle with bulky array functions. It´s still long, though.

Röda, 46 41 39 bytes
f l{l|[_]if[_1*#l<seq(1,#l)|l[:_]|sum]}

Try it online!

J, 15 bytes
#~[<[:(+/%#)+/\

Try it online! Expects a J-style array (negatives represented using _ instead of - and elements separated by spaces -- see the TIO link for examples).
I don't know if there's a way to remove the parentheses around the mean (+/%#) but removing that and the cap would be the first thing I'd try to do to golf this further.
Explanation
Sometimes J reads like (obfuscated) English.
#~ [ < [: (+/ % #) +/\
                   +/\  Sum prefixes
                     \   Get prefixes
                   +/    Sum each
          (+/ % #)      Mean
           +/            Sum of array
              %          Divided by
                #        Length of array
   [ <                  Input array is less than?
                         (gives boolean array of pairwise comparisons)
#~                      Filter by

you beat me to it by 3 mins :)

12 bytes with #~]<1#.+/\%#

@miles Unless you think it's similar enough, I think your comment might warrant its own answer.
EDIT: I think it's very clever myself.

K (oK), 26 bytes
Solution:
x@&x<(+/+/'x@!:'1+!#x)%#x:

Try it online!
Examples:
> x@&x<(+/+/'x@!:'1+!#x)%#x:1 4 -3 10
1 4 -3
> x@&x<(+/+/'x@!:'1+!#x)%#x:-289.93 912.3 -819.39 1000
-289.93 -819.39

Explanation:
Interpretted right-to-left. Struggled with a short way to extract prefixes:
x@&x<(+/+/'x@!:'1+!#x)%#x: / the solution
                        x: / store input in x, x:1 4 -3 10
                       #   / count, return length of x, #1 4 -3 10 => 4
     (               )     / do everything in the brackets together
                   #x      / count x
                  !        / til, range 0..x, !4 => 0 1 2 3
                1+         / add 1 vectorised, 1+0 1 2 3 => 1 2 3 4
             !:'           / til each, e.g. !1, !2, !3, !4
           x@              / index into x at these indices (now we have the prefixes)
        +/'                / sum (+ over) each, e.g. 1 5 2 12
      +/                   / sum over, e.g. 20
                      %    / right divided by left, 20%4 => 5 (now we have the hyper average)
   x<                      / boolean list where x less than 5
  &                        / indices where true, &0111b => 1 2 3
x@                         / index into x at these indices (now we have the filtered list)

Notes:
Alternative version taking length of input as parameter (25 byte solution):
> {x@&x<(+/+/'x@!:'1+!y)%y}[1 4 -3 10;4]
1 4 -3

Jelly, 6 bytes
<ƇÄS÷ɗ

Try it online!
Takes the list on the left and its length on the right, as explicitly permitted.
With newer builtins, Leaky Nun's +\S÷L<Ðf@ becomes ÄS÷L<Ƈ@ (which may as well be ÄS÷L>x@, using one less piece of the present, but that's besides the point), but taking the length as the right argument trades an L and an @ for one ɗ.
 Ƈ        Filter the left argument to elements which
<         are less than
   S ɗ    the sum of
  Ä       the cumulative sums of the left argument
    ÷     divided by the right argument.

Arturo, 42 bytes
$[a][select a'x[0x<average map a=>[dup+]]]

Try it
$[a][                      ; a function taking an argument a
    select a 'x [          ; select numbers from a and assign current number to x
        0                  ; push 0 to the stack
        x <                ; is x less than...
        average            ; ...the mean...
        map a => [dup +]   ; ...of the cumulative sum of a?
    ]                      ; end select
]                          ; end function

Julia 0.5, 24 bytes
~x=x[x.<mean(cumsum(x))]

Try it online!
In modern Julia, mean was moved from Base to the Statistics module:
Julia 1.0, 33 bytes
~x=x[x.<sum(cumsum(x))/length(x)]

Try it online!

Nibbles, 5.5 bytes (11 nibbles)
|$-/+`\@+,@

Nibbles uses only integers, so I'm "assuming that the numbers fit my language of choice" by omitting decimal points from fractional inputs & padding with zeros where needed.  I hope that this is not construed as "abusing" the lenient input rule in any way.
|$              # filter input to retain only those that are truthy when:
  -             #   subtracting them from
    +           #     the sum of
     `\@+       #     the cumulative sums of the input
   /            #     divided by
         ,@     #     the length of the input

Pip, 19 bytes
_<$+$+*(aH\,b)/bFIa

Makes use of the optional length input.
How?
_<$+$+*(aH\,b)/bFIa  : -xp; Two args: array and length
        a         a  : First input; array
            b  b     : Second input; length
                FIa  : Filter: keep items from iterable 'a' which return truthy
_                    : Passed element
 <                   : Is less then
        aH           : Get prefix of a that is # elements long
          \,b        : Range from one to length
    $+*              : Sum of each list
  $+                 : Sum list
              /b     : Divide by length

Try It Online!


text:
Encode an integer
Given positive integer n > 2. We convert it to an array as follows:

If it is equal to 2 return an empty array
Otherwise create array of all n's prime factors sorted ascending, then each element replace with its index in prime numbers sequence and finally convert each element to array

For example, lets convert number 46 to array. Firstly, convert it to array of its prime factors:
[2, 23]

Number 23 is 9th prime, so replace 2 with empty array and 23 with [9]. Array now becomes:
[[], [9]]

Prime factors of 9 are 3 and 3, so:
[[], [3, 3]]

Do the same for both 3:
[[], [[2], [2]]]

And finally:
[[], [[[]], [[]]]]

Now, to encode it, we simply replace each open bracket with 1 and each closing bracket with 0, then remove all ending zeros and drop one 1 from the end. This is our binary number. Using the above example:
[ ] [ [ [ ] ] [ [ ] ] ]

| | | | | | | | | | | |
| | | | | | | | | | | |
V V V V V V V V V V V V

1 0 1 1 1 0 0 1 1 0 0 0

Now simply drop the last three zeros and the last 1. The number becomes 10111001 which is 185 in decimal. That is the expected output. Notice that in array to binary conversion brackets of the main array are not included.
Input
Positive integer n greater than 2.
Output
Encoded integer n.
Rules and IO format

Standard rules apply.
Input can be string or number (but in case of string it must be in base 10).
Output can be string or number (but in case of string it must be in base 10).
This is code-golf, the shortest answer in bytes wins!

Test cases
More test cases upon request.
3 ---> 1
4 ---> 2
5 ---> 3
6 ---> 5
7 ---> 6
8 ---> 10
9 ---> 25
10 ---> 11
10000 ---> 179189987
10001 ---> 944359
10002 ---> 183722
10003 ---> 216499
10004 ---> 2863321
10005 ---> 27030299
10006 ---> 93754
10007 ---> 223005
10008 ---> 1402478

Sandbox

You should remove the test case with 2 since the submissions are not required to handle it.

Or just say n >= 3 if 2 is not in the input domain

Ok, fixed. Initially, I really didn't see why is 2 a problem, but in the comments at sandbox post people was complaining about it, so I removed it now.

Rip languages that do not have prime built-ins.

@Mr.Xcoder. The lack of prime built-ins should not be a hindrance of posting an answer in some language. It is always interesting to see how different langauges deal with some problem.

Now simply drop the last three zeros and the last 1 - Does that apply to every number (maybe I am just dumb and didn't get the point of the challenge)?

@Mr.Xcoder. It depends on how many zeros are at the end. If there are 5 zeros, you will drop all 5 (and of course the last 1 at the end). So basically all trailling zeros and one 1.

"Firstly, convert it to array of its prime factors: [2, 23]" - Are other orders like [23, 2] also permitted?

@Paul. "[...] create array of all n's prime factors sorted ascending"

Out of curiosity, where did you come up with this question? Is there any motive behind it?

@Quelklef. I was working on implementing ATP (just for fun, nothing serious) and I tried to somehow represent every number using nested arrays. So, this encoding is the first idea I came up with.

How does 3 become 2 in "do same for 3"?

@StanStrum. Three is the second prime number.

@ThePirateBay Thanks

@ThePirateBay You might want to update the accepted answer.

@Laikoni. Done.

Probably ought to be "Encode a Natural Number" since this method doesn't allow you to encode integers less than 1.

@WheatWizard. I don't mean the precise mathematical sense of the word integer. I am going to leave it. :-)

Husk, 35 31 30 29 26 25 24 22 20 19 15 bytes
-7 bytes thanks to @Zgarb!
Saved an extra 4 bytes, indirectly, thanks to Zgarb
ḋhΣhgφṁȯ`Jḋ2⁰ṗp

Try it online!
Explaination
     φ             -- Define a recursive function which calls itself ⁰ and is applied to an Integer
      ṁ       p    -- map then concatenate over its prime factors
             ṗ     --   return their indices into the primes
            ⁰      --   and then recur, applying ⁰ to that number
       ȯ`Jḋ2       --   then surround it between the list [1,0] (binary 2)
    g              -- group adjacent equal elements
   h               -- drop last element (trailing 0s)
  Σ                -- concatenate
 h                 -- drop the last element
ḋ                  -- interpret as base 2

I think this should work for 27 bytes, but TIO times out during type inference...

Never mind, 25 bytes and working. Finally a use case for φ, the fixpoint lambda!

Wow, I've never really understood its use cases, until now

We added fixpoint lambdas to Husk very early, before multi-line programs were implemented. I guess we thought they would be the best way to handle recursion. But they are pretty obscure apart from saving one byte in special cases like this.

\:0:1can be`Jḋ2`.

22 bytes with some restructuring: apply ḋ directly to 2 instead of passing around an intermediate empty list.

Sorry for delayed acceptance. Your answer is very good. When I was crafting the challenge, I didn't expect someone will solve it using 15 bytes. Good job :-)

Jelly,  22 20  19 bytes
-1 thanks to Erik the Outgolfer (tail zeros from both sides, t, rather than from the right œr)
ÆfÆC$ÐLŒṘO%3ḟ2Ḋt0ṖḄ

A monadic link taking an integer greater than 2 and returning an integer greater than 0 (2 would return 0 as per the original spec too).
Try it online!
How?
This almost exactly replicates the description given, just with some ordinal manipulation for the creation of the binary array...
ÆfÆC$ÐLŒṘO%3ḟ2Ḋt0ṖḄ - Link: number n (>=2)
     ÐL             - loop until no more changes occur:
    $               -   last two links as a monad:
Æf                  -     prime factorisation (includes duplicates & vectorises)
  ÆC                -     count primes less than or equal (vectorises)
                    -   ...note for entries of 2 this yields [1]
                    -      then for entries of 1 it yields [], as required
       ŒṘ           - get a Python representation - just like in the OP,
                    -    something like: "[[], [[[]], [[]]]]" (for an input of 46)
         O          - convert to ordinals e.g. [91,91,93,44,32,91,91,91,93,93,44,32,91,91,93,93,93,93]
          %3        - modulo by 3         e.g. [ 1, 1, 0, 2, 2, 1, 1, 1, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0]
            ḟ2      - filter discard twos e.g. [ 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0]
              Ḋ     - dequeue             e.g. [ 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0]
               t0   - strip zeros         e.g. [ 1, 0, 1, 1, 1, 0, 0, 1, 1]
                 Ṗ  - pop                 e.g. [ 1, 0, 1, 1, 1, 0, 0, 1]
                  Ḅ - binary to decimal   e.g. 185

Ah, yes, I definitely can; thanks.

Python 2, 212 177 bytes
lambda n:int(g(n).rstrip("0")[1:-1],2)
g=lambda n:"1%s0"%"".join(map(g,p(n)))
def p(n,i=0,j=1):
 while n>1:
  j+=1;P=q=1;exec"P*=q*q;q+=1;"*~-j;i+=P%q
  while n%j<1:yield i;n/=j

Try it online!
The lack of prime builtins really hurts the byte count, and it times out on TIO with larger primes. Uses xnor's primality check.

Python 2 + gmpy2, 175 bytes
lambda n:int(g(n).rstrip("0")[1:-1],2)
g=lambda n:"1%s0"%"".join(map(g,p(n)))
def p(n,i=0,j=1):
 while n>1:
  j+=1;i+=is_prime(j)
  while n%j<1:yield i;n/=j
from gmpy2 import*

Try it online!
This version does not time out on the larger test cases (i.e. 10000 - 10008).

Mathematica, 125 119 bytes
Flatten[#//.{{1}->{1,0},a_/;a>1:>{1,List/@PrimePi[Join@@Table@@@FactorInteger@a],0}}]/.{1,d__,1,0..}:>{d}~FromDigits~2&

Uses a slightly different approach; converts prime indices to {1, index, 0}, and 2 to {1, 0}.
Try it on Wolfram Sandbox
Usage:
f = Flatten[ ...

f[10008]

1402478

Original answer works on 10008, but this one fails

@KellyLowder Fixed!

Jelly, 35 bytes
ÆfẎW€ÆC2,“”y¹ß€Ṇ?
ÇŒṘḊ⁾][iÐ€ḟ0t1Ṗ’Ḅ

Try it online!

J, 74 73 66 bytes
3 :'#.(}.~ >:@i.&1)&.|.2+}.;<@(_2,~_1,[:>:[:_1&p:q:) ::<"0@;^:_ y'

Try it online!
This is a real mess that certainly is in need of further golfing (e.g. removal of the explicit function definition). I think that the boxing I've been doing is especially what's bringing up the bytecount since I really don't know what I'm doing there (it's been a lot of trial and error). Also, I'm pretty sure that there are some built-ins I'm forgetting about (e.g. I feel like _2,~_1, probably has a built-in).
Explanation (ungolfed)
Preamble
Sit back tight, because this is not going to be a short explanation. Ironically, a terse language has been paired with a verbose person.
I'll be splitting this into a few functions
encode  =. 3 : '<@(_2,~_1, [: >: [: _1&p: q:) ::<"0@;^:_ y'
convert =. 3 : '2 + }. ; y'
drop    =. (}.~ >:@i.&1)&.|.
decode  =. #.

encode encodes the integer using _1 and _2 instead of [ and ]
convert converts a list of _1 and _2 into a list of 1 and 0
drop drops the last 1 and trailing zeroes
decode converts from a binary list to a number

I'll be walking through a sample call for 46, which expressed in the ungolfed format is done
   decode drop convert encode 46
185

Encode
There's a lot to explain here.
3 : '<@(_2,~_1, [: >: [: _1&p: q:) ::< "0@;^:_ y'
                                           ^:_      Do until result converges
                                          ;          Raze (remove all boxing)
                                       "0            For each
                               q:                     Factorize
                         _1&p:                        Get index of prime
                   >:                                 Add 1 (J zero-indexes)
            _1,                                       Prepend -1
        _2,~                                          Append -2
     <                                                Box resulting array
                                   ::                If there is an error
                                     <                Box the element

Note that the explicit function definition 3 : '[function]' evaluates the function as if it were on the REPL with the right argument replacing every instance of y (this means that I can avoid having to use caps ([:), atops (@), and ats (@:) at the cost of a few bytes).
Here's what it looks like for each successive iteration on the input of 46
┌─────────┐    ┌──┬─────┬─────────┬──┐    ┌──┬──┬──┬──┬───────┬───────┬──┬──┐
│_1 1 9 _2│ => │_1│_1 _2│_1 2 2 _2│_2│ => │_1│_1│_2│_1│_1 1 _2│_1 1 _2│_2│_2│ =>
└─────────┘    └──┴─────┴─────────┴──┘    └──┴──┴──┴──┴───────┴───────┴──┴──┘

┌──┬──┬──┬──┬──┬─────┬──┬──┬─────┬──┬──┬──┐
│_1│_1│_2│_1│_1│_1 _2│_2│_1│_1 _2│_2│_2│_2│ => the final iteration is just every
└──┴──┴──┴──┴──┴─────┴──┴──┴─────┴──┴──┴──┘    value in its own box

This function makes use of adverse (::) in order to nest the values in "brackets" (the brackets used here are -1 and -2). Basically, every time we factorize and convert to prime number indices, _1 is prepended and _2 is appended, which act as brackets. When the function is called on those elements, it just returns them as-is since q: will error on trying to factorize a negative number. It's also fortunate that q: does not error on trying to factorize 1 and instead returns the empty array (as desired).
Convert
3 : '2 + }. ; y'
            ;     Raze (remove boxing)
         }.       Behead (remove head)
     2 +          Add 2

Convert is a lot simpler. It just removes all the boxing, as well as the first element, and then converts everything to 1s and 0s (simply by adding 2)
Drop
(}.~ >:@i.&1)&.|.
             &.|.  Reverse, apply the left function, and then undo
 }.~ >:@i.&1        Drop the leading zeroes and first 1
        i.&1         Index of first one
     >:              Add 1
 }.~                 Drop

This reverses the list, finds the first one and then drops all the values up to that one, then reverses the list again.
Decode
Decode is the built-in function #. which takes a list of 1s and 0s and converts it to a binary number.

Retina, 244 227 225 bytes
+%(G`
\d+
$*0¶$&$*
+`^00(0+)
0$1¶$0
A`^(00+?)\1+$
^0+
$0;1
+`(1+)¶0+(?=¶)
$0;1$1
+`¶(11+?)(\1)*$
¶$1¶1$#2$*1
1$

m`^11$
[]
m`^1+
[¶$.0$*0¶]
+s`(0+);(1+)(.+¶)\1¶
$1;$2$3$2¶
0+;1+¶

)`1+
$.0
T`[]¶`10_
10+$

1
01
+`10
011
^0+

1

Try it online!
This is a straight forward approach following the algorithm demonstrated in the question.  The prime index generation is exponential complexity so it will time out for larger inputs
Explanation:
+%(G`                Repeatedly apply on each line:
\d+                      If the line is a number, convert it to unary 0s and 1s
$*0¶$&$*
+`^00(0+)                Generate all prefixes of the zeros greater than 1
0$1¶$0
A`^(00+?)\1+$            Remove non-prime strings of zeros
^0+                      Index the first zero set (00) as 1
$0;1
+`(1+)¶0+(?=¶)           Index the rest of the zeroes as their prime index
$0;1$1
+`¶(11+?)(\1)*$          Compute prime factors of input value
¶$1¶1$#2$*1
1$                       Remove the 1 factor (not really prime)

m`^11$                   Turn all 2 prime factors to []
[]
m`^1+                    Surround all non-2 prime factors in brackets
[¶$.0$*0¶]
+s`(0+);(1+)(.+¶)\1¶     Convert non-2 prime factors to their index
$1;$2$3$2¶
0+;1+¶                   Remove the list of primes

)`1+                     Return all primes back to decimal ready to be repeated
$.0
T`[]¶`10_            Then convert all [ to 1 and ] to 0, and remove linefeeds
10+$                 Remove the final 1 and trailing zeroes

1                    Convert from binary to unary
01
+`10
011
^0+

1                    Convert from unary to decimal

Haskell, 162 160 155 bytes
sum.zipWith((*).(2^))[0..].tail.snd.span(<1).(r%)
r=zip[1..][x|x<-[2..],all((>0).mod x)[2..x-1]]
_%1=[]
((i,q):p)%n|mod n q<1=r%div n q++0:r%i++[1]|1<3=p%n

Try it online!
Explanation:
r=zip[1..][x|x<-[2..],all((>0).mod x)[2..x-1]] defines an infinite list of tuples of primes and their indices: [(1,2),(2,3),(3,5),(4,7),(5,11),(6,13), ...].
The function (%) takes this list r and a number n and converts the number into the reversed factor-array representation. This is done by stepping through r until we find a prime which divides n. We then recursively determine the representation of the index of this prime and enclose it in 0 and 1 and prepend the representation of n divided by that prime.
For n=46, this yields the list [0,0,0,1,1,0,0,1,1,1,0,1] from which then the leading zeros (snd.span(<1)) and the next 1 (tail) are dropped. Afterwards the list is converted to a decimal number by element-wise multiplying with a list of powers of two and summing up the resulting list: sum.zipWith((*).(2^))[0..].

tinylisp, 209 bytes
(load library
(d [(q((N)(map(q((P)([(length(filter prime?(1to P))))))(reverse(prime-factors N
(d B(q((L)(c 1(insert-end 0(foldl concat(map B L
(d T(q((N)(if(mod N 2)(/ N 2)(T(/ N 2
(q((N)(T(from-base 2(t(B([ N

The last line is an unnamed function that computes the specified encoding. Try it online!
Pre-golfing version
This is the code I had before I started golfing it down:
(load library)

(def prime-index
 (lambda (P)
  (length (filter prime? (1to P)))))

(def to-list
 (lambda (N)
  (map to-list
   (map prime-index
    (reverse (prime-factors N))))))

(def to-bits
 (lambda (L)
  (cons 1
   (insert-end 0
    (foldl concat
     (map to-bits L))))))

(def trim
 (lambda (N)
  (if (mod N 2)
   (div2 N 2)
   (trim (div2 N 2)))))

(def encode
 (lambda (N)
  (trim
   (from-base 2
    (tail (to-bits (to-list N)))))))

05AB1E, 18 bytes
ΔÒ.Ø>}¸»Ç3%2K0Ü¨2β

Try it online!
Explanation:
Δ    }       # loop until a fixed point
 Ò           # replace each number with its prime factorization
  .Ø>        # replace each prime with its 1-based index
¸»           # after the loop: join to a string
  Ç          # get ASCII value of each character
   3%        # modulo 3 (maps '[' to 1, ']' to 0, ' ' to 2, ',' to 2)
     2K      # remove 2s
       0Ü    # trim trailing 0s
         ¨   # remove the last 1
          2β # parse as base 2

JavaScript, 289 bytes
The bytes are the sum of the JavaScript code without linebreaks after the commas (which are inserted only for better formatting and readability) (256 bytes) and the additional characters for the command line switch, which is required when using Chrome (33 bytes).
'use strict'
var f=(n,i=2,r=[])=>n>1?n%i?f(n,i+1,r):f(n/i,i,r.concat(i)):r,
c=(p,r=1,i=2)=>i<p?f(i)[1]?c(p,r,i+1):c(p,r+1,i+1):r-1?f(r).map(h):[],
h=a=>c(a),
s=a=>a.reduce((r,e)=>r+s(e),'1')+' ',
o=i=>+('0b'+s(f(i).map(h)).trim().replace(/ /g,'0').slice(1,-1))

And a longer, better readable version:
'use strict';
const f = (n,i=2,r=[]) => n>1 ? n%i ? f(n,i+1,r) : f(n/i,i,r.concat(i)) : r;
const c = (p,r=1,i=2) => i<p ? f(i)[1] ? c(p,r,i+1) : c(p,r+1,i+1) : r-1 ? f(r).map(h) : [];
const h = i => c(i);
const s = a => a.reduce((r,e) => r+s(e),'1')+' ';
const o = i => +('0b'+s(f(i).map(h)).trim().replace(/ /g,'0').slice(1,-1));

Some brief explanations:
f is a purely functional tail-recursive factorization algorithm.
c counts at which place r the prime number p occurs in the sequence of prime numbers and returns either [] (if p=2 and r=1) or factorizes and further processes r by means of recursion.
h is a small helper function which unfortunately is necessary as map calls the supplied function with numberOfCurrentElement as the second and wholeArray as the third argument, thus overriding the default values provided in c if we would pass this function directly (it took me some time to get after this pitfall; replacing h by its definition would be a few bytes longer).
s transforms the generated array to a string. We use blank instead of 0 so that we can use trim() in o.
o is the function to be called with the input value i which returns the output. It generates the binary string representation required by the specification and converts it to a (decimal) number.
Edit: Chrome must be started with chrome --js-flags="--harmony-tailcalls" to enable optimization of tail-recursion (see https://v8project.blogspot.de/2016/04/es6-es7-and-beyond.html). This also requires using strict mode.
The following test shows that the computation is a bit slow for some values (the longest is more than six seconds for 10007on my computer). Interestingly, without optimization of tail-recursion the computation is much faster (about factor 5) when there is no stack overflow.
for (let i=3; i<=10008; i==10 ? i=10000 : ++i) {
    let time = new Date().getTime();
    let val = o(i);
    time = new Date().getTime() - time;
    document.write(i + ': ' + o(i) + ' (computed in ' + time + ' ms)<br>');
}


text:
Polyglot the (non constant) OEIS!
Disclaimer: This is heavily inspired by "Polyglot the OEIS!" but fixes the problem that lead to closure (see the output section) and was re-posted as to not invalidate answers.
Introduction
We all know and love the on-line encyclopedia of integer sequences (OEIS). So what if we made an off-line version of the interesting sequences? 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.
To not make this question a duplicate of The versatile integer printer constant sequences are banned. This should also increase the difficulty level of submissions and avoid "boring" solutions ;)
A sequence is non-constant if there exist two sequence members that are unequal.
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.

This post was done in accordance to this Meta Q&A.

Can different languages have different indexing?

@StepHen yes they can.

3 languages (1 byte) - Pyth (A001477), MATL (A000027), Braingolf (A000217)
Q

Try Pyth online!, 0-indexed (non-negative integers)
Try MATL online!, 0-indexes (positive integers)
Try Braingolf online!, 1-indexed (triangular numbers)

How?
Q does the following:

In MATL, it means + 1, so it basically evaluates to input + 1.

In Pyth, it means input, so it just outputs the input.

In Braingolf, it is the built-in for triangular numbers.

Mini-polyglot
Pyth can be replaced by any of the following languages: GolfScript, Pyke, Brachylog or Brain-Flak.

well you certainly picked the right languages for this one +1 :P

@HyperNeutrino I just ported my answer from there, but I chose very good languages back then, so yeah :P - Thanks!

Remember, this is number of languages, not code-golf :P

@StepHen I think 3 is reasonable.

10 languages, 122 bytes
#|A=1:0;~@}{\,[.,];oi
#coding:utf-8
print (0 and gets.to_i-1 or int(input())**(2+(1/2>0)));quit()#⎚Ｉ±Ｎ»
# x
#x%:+.

I definitely can add a bunch more. 1-indexed unless otherwise specified.
Note that I may not be up-to-date on TIO links when I'm sure newer changes didn't affect older programs - you can test them if you want to, but copying 10+ new TIO links every time I make a change gets tiring after a bit. I'll copy new ones every 5 updates or so.
cQuents v0, A000007
Relevant code: #|A=1:0;
#|A catches the input and is there for Python comments. =1 means the first item is 1, :0 mean the rest are 0, outputs the nth term given input n. cQuents v0 has a weird bug/feature that when an unexpected but valid token, such as ;, is read, it causes parsing to end.
Try it online!
PingPong, A001478
Relevant code: #|A=1:0;~@
Outputs via exit code. 0-indexed.
# skips the next char. = does nothing here. 1 pushes 1, and : prints 1 to STDOUT. 0 pushes 0. ) does nothing. ; pushes input, ~ pops and pushes -n-1. @ terminates. The exit code is the top of the stack.
Try it online!
axo, A001477
Relevant code: }{\
0-indexed. } reads and pushes an integer from STDIN (requires trailing newline for some reason), { prints an the top of stack, and \ ends the program. I'm not sure what the preceding characters do, but nothing that matters in this case.
Try it online!
brainfuck, A000027
Relevant code: ,[.,]
Simple cat program from esolangs.org. Outputs the input.
Try it online!
><>, A000030
Relevant code: # ... ;oi
# mirrors and wraps to the right, which direct it to read io;, which outputs the first character of the input. 0-indexed.
Try it online!
Ruby, A023443
Relevant code: print (0 and gets.to_i-1 ... )
0-indexed. Prints the input minus 1. 0 is truthy in Ruby, but falsey in Python.
Try it online!
Python 3, A000578
Relevant code: print (0 and gets.to_i-1 or int(input())**(2+(1/2>0)));quit()
Ripped off of HyperNeutrino's original post, but it's a pretty well-known polyglot. quit() ends the program.
Try it online!
Python 2, A000290
Relevant code:
#coding:utf-8
print (0 and gets.to_i-1 or int(input())**(2+(1/2>0)));quit()

#coding:utf-8 is required for the Charcoal stuff to work. Also ripped off of HyperNeutrino's original post. quit() ends the program.
Try it online!
Charcoal, A001489
Relevant code: ⎚Ｉ±Ｎ»
0-indexed. ⎚ clears the console (Charcoal prints ASCII as-is) and Ｉ±Ｎ prints the negative of the input. » is a parse error and terminates the program.
Thanks to ASCII-only for help in chat.
Try it online!
Cardinal, A020725
Relevant code:
 x
x%:+.

Adds 1 to the input, and squashes all other pointers.
Try it online!

Looks like exit code for PingPong is the ToS, it wraps at 2^32 as would be expected of a 64-bit signed integer.

@JonathanAllan cool, thanks.

Do you really need to exit with a parse error if the Charcoal code is already at the end of the program?

@MDXF no, I was (am) planning to add more at the end

5 languages (05AB1E, Actually, CJam, Jelly, MATL), 7 bytes
UD>li)+

Try it online!:

05AB1E: sequence A000027 (positive integers: a(n) = n; 1-based)
Actually: sequence A023443 (non-negative integers including 1: a(n) = n−1; 0-based)
Cjam: sequence A020725 (positive integers excluding 1: a(n) = n+1; 1-based)
Jelly: sequence A005843 (non-negative even numbers: a(n) = 2*n; 0-based)
MATL: sequence A000290 (squares: a(n) = n2; 1-based). Exits with an error after producing the output.

3 languages: Proton, A000583; Python 3, A000578; Python 2, A000290
Proton, 49 bytes
print(int(input())**(2+(1/2>0)+((''',''')!=',')))

Try it online!
Python 3, 49 bytes
print(int(input())**(2+(1/2>0)+((''',''')!=',')))

Try it online!
Python 2, 49 bytes
print(int(input())**(2+(1/2>0)+((''',''')!=',')))

Try it online!
Explanation
Proton doesn't have '''...''' strings, so (''',''') becomes ('' ',' ''), which somehow doesn't cause issues. It evaluates to '', making (''',''')!=',' evaluate to True.
Python does have these strings, so (''',''') is just ',' so (''',''')!=',' evaluates to False.
Python 2 uses floor division for integers, so 1/2>0 is false in Python 2 and true in Python 3.

You might be able to add some more langs if you turn the Python line into 1//1;print(int(input())**(2+(1/2>0)+((''',''')!=',')));quit() and then add languages like JavaScript afterwards

@StepHen Sure, that might work, thanks. I'll do that once I get around to adding JavaScript :P

5 Languages, 107 bytes
s=1/2;1//2;q=int(input())*([2,3][s>0]);"""/.__id__;'
alert(+prompt()+1);`"""#=;#';q=gets
print(q)#)|<>%2)#`

Perl: A000035
Using = as a delimiter for s/// means we can easily exclude code we don't want, and using ) as the delimiter for q{} means after printing q in all other languages, we can just work on <> directly, without worrying.
s/1...q/i...#/;
print(<>%2)

Try it online!
Ruby: A001477
In Ruby, // is actually / (divide by) /.../ (regex match), so as long as the regex is terminated, and converted to a number, we can divide by it safely. __id__ is shorter than .to_s.ord, then we just contain the rest of the code we don't want in 's, set q to gets and print it with all the others.
s=1/2;1//2..."/.__id__;'...';q=gets
print(q)

Try it online!
Python 2: A005843
Using the standard trick to differentiate 2 from 3 and enclosing stuff we don't want in """ and comments.
s=1/2;1//2;q=int(input())*([2,3][s>0]);"""/...`"""
print(q)

Try it online!
Python 3: A008585
Try it online!
JavaScript (ES6 browser): A000027
Pretty straightforward for JS, it ended up being easier not to re-use the existing print and go for SpiderMonkey, but that might also be possible too.

s=1/2;1//2;q=int(input())*([2,3][s>0]);"""/.__id__;'
alert(+prompt()+1);`"""#=;#';q=gets
print(q)#)|<>%2)#`

6 languages: Cubically 5/6/7/8/9/10, 44 40 32 bytes
Crossed out 44 is still regular 44 ;(
DDR'DDR$:_0?{R'DDRDDB'%0}!{+00%}

This prints:

A010710 in Cubically 5x5x5
A010711 in Cubically 6x6x6
A010712 in Cubically 7x7x7
A010713 in Cubically 8x8x8
A010714 in Cubically 9x9x9
A010715 in Cubically 10x10x10

Explanation:
DDR'DDR$:_0?{R'DDRDDB'%0}!{+00%}
DDR'DDR                            get top face sum to 2 (all versions)
       $:                          read input and set notepad to it
         _0                        set notepad to input modulo 2
           ?{...........}          if truthy
             R'DDRDD                reset cube
                    B'              set top face to Cubically version number
                      %0            print top face
                         !{....}   if falsy
                           +00      add 2 to notepad twice
                              %     print

Try it online! (Cubically 6x6x6)


text:
L€€CH€$! D€AṬH ỊṢ ṢOOṄ! (Length Mapping)

The title is valid Jelly Code which has the same output as L€€ except printed twice.
Background
You can skip this section without losing ability to complete the challenge
Some operations in Jelly try to convert its argument to a list first before applying the operation. One example is €, the mapping quick. This sometimes leads to unintended output.
For the program L€ and input 5, the Jelly interpreter tries to find the length of every element of the list 5. Since 5 is not a list, Jelly converts it to the list [1,2,3,4,5]. Then the length of every element is output: [1,1,1,1,1]. Note that every integer has length 1. If e.g. 10 was present, it would become 1, not 2 (the length in digits).
For the program L€€ and input 5, the Jelly interpreter tries to find the length of every element of every element of the list 5. Since 5 is not a list, Jelly converts it to the list [1,2,3,4,5]. Now the interpreter tries to find the length of every element of every element of the list [1,2,3,4,5]. Every element is not a list, so Jelly converts them to lists in the same manner: [[1],[1,2],[1,2,3],[1,2,3,4],[1,2,3,4,5]]. The length of every sub-element is output as [[1],[1,1],[1,1,1],[1,1,1,1],[1,1,1,1,1]]
Task
Your task is to find the output of the Jelly program L followed by € repeated a times, with input b, where a and b are positive integers equal to your program/function's inputs.
A way to do this is:
Starting with the input b, do the following a times:

For every integer that the program sees, replace it with the range of the integer (where range(x) := [1,2,3,...,x-1,x])

Finally, replace every integer with 1.
Test Cases
a
b
output
- - - - -
1
1
[1]
- - - - -
1
2
[1, 1]
- - - - -
1
3
[1, 1, 1]
- - - - -
1
4
[1, 1, 1, 1]
- - - - -
1
5
[1, 1, 1, 1, 1]
- - - - -
1
6
[1, 1, 1, 1, 1, 1]
- - - - -
2
1
[[1]]
- - - - -
2
2
[[1], [1, 1]]
- - - - -
2
3
[[1], [1, 1], [1, 1, 1]]
- - - - -
2
4
[[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]
- - - - -
2
5
[[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]]
- - - - -
2
6
[[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]]
- - - - -
3
1
[[[1]]]
- - - - -
3
2
[[[1]], [[1], [1, 1]]]
- - - - -
3
3
[[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]
- - - - -
3
4
[[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]]
- - - - -
3
5
[[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]]]
- - - - -
3
6
[[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]]]
- - - - -
4
1
[[[[1]]]]
- - - - -
4
2
[[[[1]]], [[[1]], [[1], [1, 1]]]]
- - - - -
4
3
[[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]]
- - - - -
4
4
[[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]]]
- - - - -
4
5
[[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]]]]
- - - - -
4
6
[[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]]]]
- - - - -
5
1
[[[[[1]]]]]
- - - - -
5
2
[[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]]]
- - - - -
5
3
[[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]]]
- - - - -
5
4
[[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]]]]
- - - - -
5
5
[[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]]]]]
- - - - -
5
6
[[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]]]]]
- - - - -
6
1
[[[[[[1]]]]]]
- - - - -
6
2
[[[[[[1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]]]]
- - - - -
6
3
[[[[[[1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]]]]
- - - - -
6
4
[[[[[[1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]]]]]
- - - - -
6
5
[[[[[[1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]]]]]]
- - - - -
6
6
[[[[[[1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]]]]], [[[[[1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]]]], [[[[1]]], [[[1]], [[1], [1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]]], [[[1]], [[1], [1, 1]], [[1], [1, 1], [1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1]], [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]]]]]]

Rules

a and b are restricted to positive integers
Your program or function may take a and b in any order and in any standard input format
The output should be a depth-a list or string representation of such a list
The output should be returned through any standard output format.
This is code-golf, so shortest code in each language wins!

I would disallow builtins that eval a string as Jelly code (looking at you, Jelly)

@StepHen The creation of the string takes too many bytes as compared to repeating the Range function, so I will leave the capability to eval as permitted.

Fort clarification: The length of any integer is 1, not the length of its decimal expansion?

@Titus Yes. I will clarify this in the question.

The title can be golfed to L€€CH!DṬHỊṢṄ! (or maybe L€€Ṅ) btw...

Jelly, 3 bytes
R¡Ṡ

Try it online!
Takes input in reverse order.
-2 bytes thanks to fireflame.
-1 byte thanks to Dennis
Explanation
R¡Ṡ  Main link
 ¡   Repeat <first argument> times
R    Range (generates range, and vectorizes on lists)
  Ṡ  Sign (converts all numbers to 1 because they are all positive)

You can make use of implicit input by removing ⁴ and taking arguments in reverse order.

@fireflame241 oh ok thanks! -2 bytes then by removing the ^3 as well

You can use the sign atom Ṡ instead of molding.

Of course Jelly would be unbeatable here...

@Erik True, but I'm surprised that neither L nor € appears in this solution.

Python 2, 49 bytes
-1 thanks to Jonathan Allan

f=lambda a,b:1>>a or[0]*b and f(a,b-1)+[f(a-1,b)]

Try it online!
This problem seemed like it could be written in the form of a doubly recursive function, subtracting one from each parameter. The key idea is that the sequence can be related as follows:
f(0,b) = 1
f(a,0) = []
f(a,b) = f(a,b-1) + [f(a-1,b)]

However writing a recursive function like this is pretty tricky, since 1 is a truthy value and [] is a falsy value, so we need two short-circuiting keywords (and and or).
A less golfed version might look like:
lambda a,b:int(a<1)or[1,[]][b<1]and f(a,b-1)+[f(a-1,b)]

However we can use the trick that 1>>a gives 1 if a is zero, and 0 otherwise, and that we can return a truthy value if b>0 and an empty list otherwise by doing [0]*b.

Save one with or[0]*b and in place of or[0][:b]and.

Mathematica, 17 bytes
1^Range~Nest~##&

Takes b then a.
Try it on Wolfram Sandbox
How?
1^Range~Nest~##&

  Range             (* Range function; generates {1..<input>} *)
       ~Nest~##     (* Apply it on <input 1> <input 2> times *)
                    (* Mathematica automatically maps Range onto integers *)
1^                  (* Raise those to the exponent of 1; make everything 1 *)

Usage
1^Range~Nest~##&[4, 2]

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

Gaia, 7 bytes
ẏ¦”@)⊃e

Try it online!
ẏ¦ does just about the same thing here as L€ in Jelly. ẏ is "is positive?" and ¦ is map, which also implicitly casts an integer to the range 1 .. n before mapping. And since we're dealing with only integers >= 1, ẏ will result in 1 for each.
ẏ¦”      Push the string "ẏ¦"
   @)    Push the first input+1
     ⊃   Repeat the last character of the string until it's input+1 characters long.
      e  Eval it.

Python 2, 57 55 bytes
-1 byte thanks to Jakob
-1 byte thanks to notjagan

f=lambda a,b:[1]*b*(a<2)or[f(a-1,i+1)for i in range(b)]

Try it online!

PHP, 134 bytes
for($r=[$argv[2]];$argv[1]--;)($w=array_walk_recursive)($r,function(&$n){$n=range(1,$n);});$w($r,function(&$n){$n=1;});print_r($r[0]);

There may be a shorter approach than the literal one ... but it´s working at least.
Run with -nr and provide a and b as arguments or try it online.

For output as in the examples, use echo strtr(preg_replace('#"\d":#','',json_encode($r[0],JSON_NUMERIC_CHECK)),"{}","[]"); (as I do in the TiO) instead of print_r($r[0]);.

JavaScript (ES6), 95 bytes

f=(a,b,r=/\d+/g)=>a--?f(a,b.replace(r,s=>`[${[...Array(+s)].map((_,i)=>++i)}]`)):b.replace(r,1)
<div oninput=o.textContent=f(a.value,b.value)><input type=number min=0 value=0 id=a><input type=number min=0 value=0 id=b><pre wrap id=o>1

I/O is with strings. The best I could do nonrecursively was 100 bytes:
(a,b)=>[...Array(-~a)].reduce(r=>r.replace(/\d+/g,a--?s=>`[${[...Array(+s)].map((_,i)=>++i)}]`:1),b)

Brachylog, 21 bytes
,1{t+₁I&⟦₁ᵐ⁾;I}ⁱ⁽ṡᵐ⁾c

Try it online!
Conceptually simple, but keeping track of the right level to map the 'range' ⟦ predicate at, takes up almost half the bytes. :(
                 % Implicit input, list [a, b]
,1               % Append iteration index 1 to the list
{           }ⁱ⁽  % Do this iteratively a times, with [b, i] as the initial input
 t+₁I            % Increment iteration index, let this be I
     &⟦₁ᵐ⁾       % Map the "range from 1 to input" predicate on the first part of input
                 %   (b in the first iteration), at depth given by (old) iteration index
          ;I     % Append the incremented index to this, this is the input to next iteration
ṡᵐ⁾              % Take the sign of each element, mapped at depth given by final I
c                % "Concatenate" to remove extra surrounding array

And a recursive solution, just for the heck of it:
24 bytes
{t0&hṡᵐ|t-₁L&h⟦₁ᵐ;Lz↰ᵐ}c

Try it online!

Jelly, 12 bytes
⁴Ṿ;”L;”€ẋ³¤V

Try it online!
Just to get things started. I'm pretty sure it would be shorter if I actually did it the way I'm supposed to, so I'm working on that (inb4 ninja'd by someone)
Explanation
⁴Ṿ;”L;”€ẋ³¤V  Main link
 Ṿ            Generate Jelly code that will evaluate to
⁴             The second input
  ;           Concatenate with
   ”L         "L"
     ;        Concatenate with
      ”€ẋ³¤   Niladic Expression
      ”€      "€"
        ẋ     Repeated                times
         ³             <first input>
           V  Jelly-eval it