[Question]
  [
[Pascal's triangle](https://en.wikipedia.org/wiki/Pascal%27s_triangle) is a triangular diagram where the values of two numbers added together produce the one below them.
This is the start of it:
```
    1
   1 1
  1 2 1
 1 3 3 1
1 4 6 4 1
```
You can see that the outside is all 1s, and each number is the sum of the two above it. This continues forever.
Your challenge is to check whether a non-empty array of positive integers is a row of Pascal's triangle, somewhere down the line.
You should output two distinct values for truthy and falsy.
## Scoring
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), shortest wins.
## Testcases
Truthy:
```
[1]
[1,2,1]
[1,3,3,1]
[1,5,10,10,5,1]
[1,6,15,20,15,6,1]
[1,7,21,35,35,21,7,1]
```
Falsy:
```
[2]
[1,2]
[1,1,2]
[2,2,2,2]
[1,2,10,2,1]
[1,2,3,4,5,6]
[1,3,5,10,5,3,1]
```
  
[Answer]
# [Haskell](https://www.haskell.org/), ~~36~~ ~~31~~ 26 bytes
```
f[1]=1
f(1:b)=f$scanr1(-)b
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/Py3aMNbWkCtNw9AqSdM2TaU4OTGvyFBDVzPpf25iZp5tSj6XgkJBUWZeiQpQqY6JjhkQG8b@BwA "Haskell ‚Äì Try It Online")
This version errors as a false indicator and returns `1` as the true indicator. It's short but I generally find these sorts of answers a little cheaty so below I have a version with a more traditional output method:
# ~~42~~ ~~37~~ 32 bytes
```
f[1]=1
f(1:b)=f$scanr1(-)b
f _=0
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/Py3aMNbWkCtNw9AqSdM2TaU4OTGvyFBDVzOJK00h3tbgf25iZp5tSj6XgkJBUWZeiQpQg46JjhkQG8b@BwA "Haskell ‚Äì Try It Online")
Outputs `1` for yes and `0` for no.
This is I believe the only answer here using this method. We use `scanr1(-)` to calculate what the layer above would have to be in order to produce the input, and check if that new smaller layer holds. If we encounter `[1]` we halt with yes, because that is the first layer of Pascal's triangle. And if we encounter something starting with something other than `1` we halt with no.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 6 bytes
```
L‚Äôc≈ª$‚Åº
```
[Try it online!](https://tio.run/##y0rNyan8/9/nUcPM5KO7VR417vl/uP3opIc7Z2hG/v8fzRVtGKsDJHSMdKAMYyCEMk11DA1AyBQmYKZjaKpjZAAizWBi5jpGQE2mIGQE4oGFjSByQGNBDAMdEyA0gFtkgLDNCGibCdACM5jlphALQW7gigUA "Jelly ‚Äì Try It Online")
As each row of Pascal's triangle has a unique length \$n\$, all we have to do is reconstruct the row, given its length, and check if it equals the original input. As each row is given by \$\binom{n-1}{i}, 0 \le i < n\$, we just calculate that (as Jelly has a 1 byte for binomial coefficient)
In fact, if we can take the length of the input as a second input, we can get [5 bytes](https://tio.run/##y0rNyan8//9Rw8zko7tVHjXu@a/jc3i5g77m///RXNGGsTpAQsdIB8owBkIo01TH0ACETGECZjqGpjpGBiDSDCZmrmME1GQKQkYgHljYCCIHNBbEMNAxAUIDuEUGCNuMgLaZAC0wg1luCrEQ5AauWAA)
## How it works
```
L‚Äôc≈ª$‚Åº - Main link. Takes a list L on the left
L      - Length of L
 ‚Äô     - Decrement
    $  - Last 2 links as a monad f(len-1):
   ≈ª   -   Range from 0 to len-1
  c    -   Binomial coefficient of len-1 and each element in the range
     ‚Åº - Does that equal the input?
```
[Answer]
# [R](https://www.r-project.org/), 43 bytes
Or **[R](https://www.r-project.org/)>=4.1, 36 bytes** by replacing the word `function` by `\`.
```
function(r)any(r-choose(x<-sum(r|1)-1,0:x))
```
[Try it online!](https://tio.run/##VY7RCsIwDEXf/ZIEUkjjWkH0Y6Ss6IMtdA4m7N9rO5mt5JLcJISclP01@zm41yMGSHgLb0jK3WOcRlguapqfkFaNShOfF8TswYFGPGyVhJo/lmidIc1VpptZ0oaEa7bd@ERSrk2V1G7fSHvzc80zDSW4R@E/Hik8Q/lvO0LzRdpA8wc "R ‚Äì Try It Online")
Taking also length of input as second argument, we can shave 6 bytes off: [Try it online!](https://tio.run/##TU7RCgMhDHvfl1jogdVTx2AfM2SywaHgtod9vWv1ZEdDSRoxqS1dW/rk@H6WrCpucMtfVZf4KOV1V9tCSBfeAC2pqAiQ4NQZGqZop7I8rNepHZIWOLn6efVIDo2W7cUI0who@A8nMKLYOw/PHCOBsfOu9niNK48@xBvJ7g3d/2T5EQcf@tjR043yAdoP "R ‚Äì Try It Online").
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), ~~11~~ 9 bytes
Saved 2 bytes thanks to Bubbler
```
‚ä¢‚â°‚ç≥‚àò‚â¢!‚â¢-‚â°
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///qG@qp/@jtgkG/9OA5KOuRY86Fz7q3fyoY8ajzkWKQKwLFPj/Xz2kqLQko1KdK03B8FHvFkMQrWCkAKGNgRDCMlEwA2II21TB0ACETKF8MwVDUwUjAxBpBhUyVzAC6jYFISMQz5BL3S0xpxhujRFYFdAiIG0ANNhEwQBmsQHcdiOg7SZAW8ygbjGFWAp0EgA "APL (Dyalog Unicode) ‚Äì Try It Online")
Requires 0-indexing.
```
‚ä¢‚â°‚ç≥‚àò‚â¢!‚â¢-‚â°
‚ä¢         ‚çù Does the input
 ‚â°        ‚çù equal
  ‚ç≥‚àò‚â¢!‚â¢-‚â°  ‚çù the row of Pascal's triangle with the same length?
     ‚â¢-‚â°  ‚çù The number r of the real row that has the same length
     ‚â¢    ‚çù The length of the input
      -‚â°  ‚çù Decremented/Minus the depth (which is always one)
  ‚ç≥‚àò‚â¢      ‚çù The column numbers for that row (a range [0..r])
    !     ‚çù Get the number at row r and column c for each element in the previous range
```
[Answer]
# [C (clang)](http://clang.llvm.org/), 66 bytes
```
i,c,t;f(*p,n){for(t=c=i=1;i<=n;c=c*(n-i)/i++)t=t&&p[i-1]==c;*p=t;}
```
[Try it online!](https://tio.run/##bVFtb4IwEP7ur7iQaABLBjhcTO2@LPsV6gdTQZu5ztCauSz@9bG7VlRU0h7c89w93ItM5Hap102jmGSWV2G8Yzr6rb7q0AoplMi4mgrNpZBxqBMVPanhMLLCDga7mUqyhRCSxzth@bFR2sLnUukw6v32AIB8WxprZgsQ4CB8MgZZmrKLl7N7bOTOHVwQ4G/xgB4jgHie@vf4QcgL0qRf@Jt7qBuWk8RNhV3gDsM/PruTPsilcn2Td9TIJfla89sJFOdOR7fZSUYfR05WbpZ1jLaUH2XtRw3B/PCezw@TN7xFwDr@KDgl0n4MhqfOw5VDSJBy0GlzagGvzqW1n3eoKggvPEwm0YloA7x67ERQzsXCEAy/8JVTYPi7BEzEO4lQl2a/pcyYgnivy2oGtt7bzU8rTWUIQTu80tnVGFuFwSy4Vndtakw0HPRUocHGLvRVHvRXODmvrxfRA2WgYfdX0DdzjaG@aHZeRduEOFXb0aDBKxxJ1mLHXmvq0u5rTWs5Nn@y2i7Xpkm@/wE "C (clang) ‚Äì Try It Online")
# [C (clang)](http://clang.llvm.org/), 55 bytes
```
i,c;f(*p,n){for(c=i=1;i<=n;c=c*(n-i)/i++)c/=p[i-1]==c;}
```
Inspired by Wheat Wizards' post. Triggers a floating point exception for falsey.
[Try it online!](https://tio.run/##bVNNj5swEL3zK0ZUkYBAF0jZKiLeS7WteqvUYxJVrIHELesgPrZbrfLXl45tTCDEwsZ@M2/m2WNTjxYJP3Qdc2mcW07pcvstP1UWJYwEMdsQHlNCHYt7zL5jy6VN70i5ZV6wJ4TG5@4D47Ro0ww2NTvwpPh4fDBGWJOy0wwq2NMVljW/n0uBGfj/9dTmkPGX2DBeTiyFY8LTIqssxhvAJDa8GYANp8WJH5BgobMLgR0bZ8MQXk1WN3nLqaA4ULogQD4iolDr5/dvX388ujo8soWR5WChg1KkAwMhOEo7tipr2oqDrwi5hfF5z@5NwaDkOWHcsg2ZWCurt3sgvRaAABP4vntZhe4cW8lvBkcCUD26Yb5HAPHQV//7Gy6f0SziR6qHCpq6hSLElcIpMMMw4yf5@Te4Qq7a5My0kiSlNbw@gWjY6eqa7QVicpZFoMekcnDM6J@sUkcN5u71Mdy9rr9gj0x3sl6ZPVHeL3RXhcVHAPLKMQn1lWN7eJBL8RSGGopLc7HDeq3vinboo3MXmqptjv8w5OAv7pbfXybZygp9c8vcmvYIlXo4EusY@IbhgAou5hEPFiluUcXne/tGZBCnIqJP5DmSo6XBEjNN5VdZ3RbaQb4vMcHXBR7U4zzzjIsUFvWOoy4VxB0KpIOS/mgmgkU5GCoJNHY29HB5hefuneZFcqg77@9/ "C (clang) ‚Äì Try It Online")
[Answer]
# [Lean](https://leanprover.github.io/), ~~187~~ ~~176~~ ~~143~~ 131 bytes
```
def q:list ‚Ñï‚Üíbool:=Œªx,by{induction x,exact[],apply(::)1,induction x_ih with h t i,exact[],cases t,exact[h],exact(h+t_hd)::i}=x
```
[Try it online!](https://tio.run/##y0lNzPv/PyU1TaHQKiezuEThUcvUR22TkvLzc6xsz@2u0EmqrM7MSylNLsnMz1Oo0EmtSEwuiY7VSSwoyKnUsLLSNNRBko7PzFAozyzJUMhQKFHIhCtOTixOLVYogfIzYiEMjQztkviMFE0rq8xa24r/yqlliTkKGoXRhrGaXAiODhrXCF3AGAjRhEx0zIAYQxBNyAih7j8A "Lean ‚Äì Try It Online")
A simpler version of this can be found below:
# [Lean](https://leanprover.github.io/), ~~190~~ ~~185~~ 169 bytes
```
def f:‚Ñï‚Üílist ‚Ñï:=Œªn,by{induction n,exact[],apply(::)1,induction n_ih with h t i,exact[],cases t,exact[h],exact(h+t_hd)::i}
def g:list ‚Ñï‚Üíbool:=Œªx,f(x.length)=x
```
[Try it online!](https://tio.run/##y0lNzPv/PyU1TSHN6lHL1Edtk3Iyi0sUgEwr23O783SSKqsz81JKk0sy8/MU8nRSKxKTS6JjdRILCnIqNaysNA11kKTjMzMUyjNLMhQyFEoUMuGKkxOLU4sVSqD8jFgIQyNDuyQ@I0XTyiqzlgvkgHQrmNVAVyTl5@eAXFChk6ZRoZeTmpdekqFpW/FfObUsMUdBIz3aMFaTC8HRQeMaoQsYAyGakImOGRBjCKIJGSHU/QcA "Lean ‚Äì Try It Online")
This version defines a helper function `f` which gives the \$n\$th row of pascal's triangle. From here we check if the input is equal to the \$m\$th row where \$m\$ is the length of the input.
This is the straightforward way to do things.
The shorter version rolls these two into one. Instead of doing induction on the length of the list, it just does induction on the list itself. This turns the already hairy induction into a real mess.
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal) `r`, 6 bytes
```
‚Çå·∫èL‚Äπ∆à‚Åº
```
[Try it Online!](https://lyxal.pythonanywhere.com?flags=r&code=%E2%82%8C%E1%BA%8FL%E2%80%B9%C6%88%E2%81%BC&inputs=%5B1%2C2%2C1%5D&header=&footer=)
vyxal (and lyxal) is the best?
```
‚Çå·∫èL‚Äπ∆à‚Åº
        (implicit input)
‚Çå       parallel stuffs, do the next two command both on the stack top 
 ·∫è      range of len(top)
  L     len(top)            currently stack [range(0,len),len]
   ‚Äπ    -1                                                len-1
    ∆à                       do combination caculation C(i,len-1) i= range(0,len)
     ‚Åº                      check equal     stack are not enough so input is used
```
[Answer]
# [BQN](https://mlochbaum.github.io/BQN/), 15 13 bytes[SBCS](https://github.com/mlochbaum/BQN/blob/master/commentary/sbcs.bqn)
-2 bytes thanks to Marshall Lochbaum
```
-Àú`‚çü‚â†‚â°1‚Äø¬Ø1‚•äÀú‚â†
```
[Try it here](https://mlochbaum.github.io/BQN/try.html#code=RiDihpAgLcucYOKNn+KJoOKJoTHigL/CrzHipYrLnOKJoAoKRsKo4p+oMeKfqeKAv+KfqDEsMiwx4p+p4oC/4p+oMSwzLDMsMeKfqeKAv+KfqDEsNSwxMCwxMCw1LDHin6nigL/in6gxLDYsMTUsMjAsMTUsNiwx4p+p4oC/4p+oMSw3LDIxLDM1LDM1LDIxLDcsMeKfqeKAv+KfqDLin6nigL/in6gxLDLin6nigL/in6gxLDEsMuKfqeKAv+KfqDAsNCw0LDDin6nigL/in6gxLDIsMTAsMiwx4p+p4oC/4p+oMSwyLDMsNCw1LDbin6nigL/in6gxLDMsNSwxMCw1LDMsMeKfqQo=).
Unlike many array languages, BQN doesn't have a binomial primitive, so a more creative solution is required.
```
-Àú`‚çü‚â†‚â°1‚Äø¬Ø1‚•äÀú‚â† #
-Àú`           # swapped minus scan
   ‚çü‚â†         # repeated input length number of times
     ‚â°        # matches
      1‚Äø¬Ø1‚•äÀú‚â† # alternating 1,-1 .. extended to the input length
```
[Answer]
# [Julia](https://julialang.org/), ~~47~~ ~~38~~ 34 bytes
```
!l=binomial.((n=[l;0][2];),0:n)==l
```
[Try it online!](https://tio.run/##VY7BCsMgEETv/kVuEaToJhpo8EtCDulhIcXaUlLo39td7SGLovNm0Zn7J@2b@5bSpXjb8/Oxb@nS9zkuabbrAuusjb1mHWMqGDt12Li4VR2OLsMCWECVA8uBFsPI4I2zvH21PFvBOG/A8hmqG9idDNBTzxuYaKCQMmBV2BJI1P@bpN/B1EXg/xVs64Gh8WBGCg5kTK2Yb1VqP/V67/lIucf@sFqf0UkEiYPEUaKXGE54HqDMQJmBMgNlBsoMDBInrcsP)
## Explanation
We just generate the n-th row of the Pascal triangle and test equality.
Thanks to amelies, we can get it down to 38 bytes!
Thanks to MarkMush, we can get it further down to 34 bytes!
[Answer]
# [Python 3](https://docs.python.org/3/), 66 bytes
```
f=lambda a,*r:r<a[1:]and f(a,*map(sum,zip(r,(1,*r))),1)or(1,*r)==a
```
[Try it online!](https://tio.run/##RY/BDoMgDIbvPgVHXHoAFJeY@STEQxdHZqJImB62l2cl4JY25e@fwlf8e39uronRDguu9wkZwiX04YZG9iO6iVlOzoqev44VPrPnAbikmbquQdZbyM0wYLRbYMhmx0xl5AhUQEERDUWRGqRIqU@jA6lBiVS707uCoks6pUpdsiujyqv5KEJASyF@QPGnKqK2BOrOJXQG513Gnvkwu51bvh9@eXCkP8Uv "Python 3 ‚Äì Try It Online")
Constructs the rows of Pascal's triangle recursively until a match is found or the generated row is larger than the input.
[Answer]
# JavaScript (ES6), 46 bytes
Returns a Boolean value.
```
a=>!a.some(v=>v-n|(n*=a.length/q++-1)-n,q=n=1)
```
[Try it online!](https://tio.run/##dZBBDoIwEEX33sIVVAq2leKqLD2BO2TRYAFNbYUiiYl3xyIbjW1mMsn8@cnkvysfuan6y32IlT6LqWYTZ/maJ0bfRDiyfIzVK1QbxhMpVDO02y6KYgxiBTumGAZTpZXRUiRSN2FQHPvH0D7LAKy@9ToscAn@NUigW9/Zcl8oxGhu6rlnEFNI0Dwzj2UPif1A5ybz9nH92IKTKg5cGlcQ4g7iVN06gqkt5AOCvFSIpZLa5JmHGV3ALOimNw "JavaScript (Node.js) ‚Äì Try It Online")
[Answer]
# [Factor](https://factorcode.org/) + `math.combinatorics`, 47 bytes
```
[ dup length 1 - dup [0,b] [ nCk ] with map = ]
```
[Try it online!](https://tio.run/##TU/BTsMwDL3vK94HQJWEZUggThwQFy6IU9VDVkyJlrkhyYQG4ttLkm4F2Xp6fpb97DfTpzFML8@PTw832FFgcoj0cSDuKWIgpmCc/TLJjhyxN@m9QhMMDzQLTT/ut5ZNXmT7CB8opaMPlhNuV6tvSPxUVAu7ynHmGlKU1IuygdRQouBmEa@h8pwuqUo16@rUlScmsM4h/gzFP1eVXdcoS89X6Nm4HjO1eD14OOIh/yhxWctWXGw7tOD7HTp82vq@xx26SSqw8d4d0UT0jkyYfgE "Factor ‚Äì Try It Online")
## Explanation:
It's a quotation (anonymous function) that takes a sequence of numbers from the data stack as input and leaves a boolean on the data stack as output. Assuming `{ 1 3 3 1 }` is on the data stack when this quotation is called...
* `dup` Duplicate the top object on the data stack.
**Stack:** `{ 1 3 3 1 } { 1 3 3 1 }`
* `length` Get the length of a sequence.
**Stack:** `{ 1 3 3 1 } 4`
* `1 -` Subtract one.
**Stack:** `{ 1 3 3 1 } 3`
* `dup` Duplicate the top object on the data stack.
**Stack:** `{ 1 3 3 1 } 3 3`
* `[0,b]` Create a range from 0 to whatever is on top of the data stack, inclusive.
**Stack:** `{ 1 3 3 1 } 3 T{ range f 0 4 1 }`
* `[ nCk ] with map` Take \$\binom{3}{0}\$, \$\binom{3}{1}\$, ... \$\binom{3}{3}\$
**Stack:** `{ 1 3 3 1 } { 1 3 3 1 }`
* `=` Are the top two objects on the data stack equal?
**Stack:** `t`
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 38 bytes
```
Factor@Fold[x#-#+#2&,#]===x^--Tr[1^#]&
```
[Try it online!](https://tio.run/##RY7BCoMwDIbvvkbBy1JoM@tOHZ48b2w3USjOMWEqSAeC6Kt3KdaNhOTPD8mXzthX0xnb1sY9tctNbYcxy4f3o5gYZweGMbBSaz1VnN/HQlasjN310zY2u4xtbwvGz8@MzPVWm36do1kuQAUQgjhSBKlACp9qN1KQClD4mu7eCZCWlE/0k7ejGcPVrQUhIKEQP6D4U5GoCYHS/Qm1gf0v0eK@ "Wolfram Language (Mathematica) ‚Äì Try It Online")
Checks that the polynomial in \$(x-1)\$ with these coefficients is a power of \$x\$.
[Answer]
# [Python 3.8 (pre-release)](https://docs.python.org/3.8/), 69 bytes
```
lambda l:[math.comb(~-len(l),x)for x in range(len(l))]==l
import math
```
[Try it online!](https://tio.run/##K6gsycjPM7YoKPqfYxttqGOqY2gAQkA6livNNuZ/TmJuUkqiQo5VdG5iSYZecn5ukkadbk5qnkaOpk6FZlp@kUKFQmaeQlFiXnqqBkRcM9bWNocrM7cgv6hEAaTtf0FRZl6JRhpI7j8A "Python 3.8 (pre-release) ‚Äì Try It Online")
Luckily python 3.8 has a built-in for n choose k
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 6 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
g<D√ùcQ
```
Port of [*@cairdCoinheringaahing*'s Jelly answer](https://codegolf.stackexchange.com/a/235367/52210).
[Try it online](https://tio.run/##yy9OTMpM/f8/3cbl8NzkwP//ow11zHWMDHWMTUHICMQzjAUA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfaXL/3Qbl8NzkwP/6/yPjjaM1Yk21DHSgdDGQAhhmeoYGoCQKZRvpmNoqmNkACLNoELmOkZAHaYgZATigUSNIMaBSQhtpAOGMGsM4HYZAe0yAZpvBrXZFGIdyAGxAA).
**Explanation:**
```
g       # Get the length of the (implicit) input-list
 <      # Decrease it by 1
  D     # Duplicate it
   √ù    # Pop the copy, and push a list in the range [0,length-1]
    c   # Get the binomial coefficient of length-1 with each integer in this list
     Q  # Check if this list is now equal to the (implicit) input-list
        # (after which the result is output implicitly)
```
[Answer]
# [Pascal (FPC)](https://www.freepascal.org/), 165 bytes
```
function f(a:Array of Integer):integer;var i,n,c:Integer;begin
i:=1;c:=1;f:=1;n:=High(a)+1;for i:=1 to n do begin
if a[i-1]<>c then f:=0;c:=Trunc(c*(n-i)/i);end;end;
```
[Try it online!](https://tio.run/##TU67DsIwDNz5Co8JtIUiYEgoEhvsbBVDCEmxhBwUAhVfXxxgYLiTddY9buZuzbX0NzsM/kE2YSDwwqhtjOYFwcOekutclAq/h36aCFhQYdXvpU@uQxqhamptM/lMpJoddhdh5ISVwB5WIQUgOAf4WTyYFsv6uN5YSBfH1aqZ5ZBD5DHCjgWVKKcotaPzB0Ouj6FXYPLCtq6q5fFvJzQg6mJRrBhzqUffIgDoIyYnvGCvZJ2zquEN "Pascal (FPC) ‚Äì Try It Online")
[Answer]
# [Perl 5](https://www.perl.org/), ~~45~~ 44 bytes
```
sub{$n=$q=1;!grep$_-$n|($n*=@_/$q++-1)*0,@_}
```
[Try it online!](https://tio.run/##ZY/dCoMwDIXvfQonYfgTt7azDiYF30Q20O1CRK0OZNuzd@28sR05hJyEhC99PbZcQSOUnG8v6AQMgha7@1j3UKXQvUPoYlFWRxiSJKVRTLCsPqrwZln7T36gpPDkdfGDaZynx3IJVruHJqTRpkaGtj/psDscKTHiTj9HypERk3NndEamL3EjZpyZrjjNtZUWDbMWNc/GE8x0EJeX/EEzDZ1pwNx5ha/cv4/UFw "Perl 5 ‚Äì Try It Online")
A translation of the JavaScript answer from @Arnauld.
[Answer]
# [Pari/GP](http://pari.math.u-bordeaux.fr/), 20 bytes
```
a->a==binomial(#a-1)
```
When `binomial` takes only one argument, it returns the `n`'th row of the Pascal's triangle.
[Try it online!](https://tio.run/##PY7BCsMgDIZfRbqLQgTNpjvZF5Ee0kOL0HVSdunTO1PdSMifP5B8yXQkveayiFBIjxTCnPb3K9Emb6StKpTzdkoSehT5SPuntgObQSySlIIY7QTRAkLTe43WObCG03XvwTpAw9X30ROwbjhOZMdTbOeu2hThih/G/FlYWY9633eyazh@YFLlCw "Pari/GP ‚Äì Try It Online")
[Answer]
# [Ruby](https://www.ruby-lang.org/), 51 bytes
```
->l{l.all?{r=0;*l,r=l.map{|x|r=x-r};r==(l[0]?0:1)}}
```
[Try it online!](https://tio.run/##ZYxBCoMwEEX3PUVXJUoMpqkuKqkHCVmoGAiM0aYKFs3Z04CbSBkG/vs8vl3ar1fcZy/YgDQA9WZ5XqWALQcyNNO2r7vla2ZdZTlHIHJZ50@aOOenqxKCSnk5Ao7iPQYWLsIHLsOfZBaKIhrCx1hgJFJKSCnTIiHdOLTaNLMeDQr46aHvZnRTCVmMfscyO8vsT/Y/ "Ruby ‚Äì Try It Online")
[Answer]
# [Pip](https://github.com/dloscutoff/pip) `-x`, ~~20~~ 14 bytes
```
L#al+:lPE!ll=a
```
[Try it here!](https://replit.com/@dloscutoff/pip) TIO doesn't support the `-x` flag, but you can simulate it using the header: [Try it online!](https://tio.run/##K8gs@B9mlfjfRzkxR9sqJ8BVMSfHNvH////RhgrGQGgYCwA "Pip ‚Äì Try It Online")
### Explanation
We generate the nth row of Pascal's triangle, where n is the length of the input list; then we output truthy if the row and the input are equal, falsey otherwise. Heavily based on [my answer to Generate Pascal's triangle](https://codegolf.stackexchange.com/a/211994/16766), which I recommend you read for a better explanation of the core algorithm.
```
                a is 1st cmdline arg, evaluated (-x flag); l is empty list
L               Loop
 #a              len(a) times:
         !l       1 if l is empty, 0 otherwise
      lPE         l with that value prepended
   l+:            Add to l itemwise and assign back to l
           l=a  1 if l equals a, 0 otherwise
```
[Answer]
# [Python 3.8 (pre-release)](https://www.python.org), 71 68 bytes
```
lambda l:[*map(math.comb,(a:=len(l))*[a-1],range(a))]==l
import math
```
[Try it online!](https://tio.run/##K6gsycjPM7YoKPr/PycxNyklUSHHKlorN7FAIzexJEMvOT83SUcj0co2JzVPI0dTUys6UdcwVqcoMS89VSNRUzPW1jaHKzO3IL@oRAGk4f9/AA "Python 3.8 (pre-release) ‚Äì Try It Online")
Using some list expansion shenanigans, it can be slightly shorter.
Old answer:
```
lambda l:list(map(math.comb,(a:=len(l))*[a-1],range(a)))==l
import math
```
[Try it online!](https://tio.run/##BcExDoAgDADA3VcwtgQH40bCS4xDVRSSFgh28fV41z5NtaxjMMlxkWHP@VUQanBWORyQDxwLMKLdaF5216k8EQgRQ@Dp7lWMkCaTpdWudowf "Python 3 ‚Äì Try It Online")
Happily, Python has a built-in combination function. This just uses a simple mapping of that to build the row of Pascal's triangle corresponding to the length of the input list and compares that to the input.
[Answer]
# [Desmos](https://desmos.com/calculator), ~~62~~ 48 bytes
*Thanks Bubbler for -14 bytes.*
The function \$f(l)\$ takes in a list of numbers, and returns `0` for falsey, `1` for truthy.
```
a=length(l)-1
f(l)=\min(\{l=\nCr(a,[0...a]),0\})
```
[Try It On Desmos!](https://www.desmos.com/calculator/liygyhonhy)
[Try It On Desmos! - Prettified](https://www.desmos.com/calculator/yovievs2dn)
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 20 bytes
```
‚¨§Œ∏‚éáŒ∫‚Åº√ó‚ÅªÔº¨Œ∏Œ∫¬ßŒ∏‚äñŒ∫√óŒ∫Œπ‚Åº¬πŒπ
```
[Try it online!](https://tio.run/##LYw9C8JAEET/ypW7cBYBsbEKaCEoWKQLKY7LYo7brNxHRH/9eYkWM/AY3tjJRPs0XMo9OsnQMkPQqqMoJn7Aa3UOi@EEnZspwc3JkuBK8sgTBNTK17T5IiO9V@9ENtJMkmkEj1jHn1d/3Er/s2ZDxGMpfV9hr9Vh62YYyu7FXw "Charcoal ‚Äì Try It Online") Link is to verbose version of code. Outputs a Charcoal boolean, i.e. `-` if it's a row, nothing if not. Explanation: The first element must always be `1`. Subsequent elements obey the recurrence relation that the previous element multiplied by the inclusive number of elements remaining equals the current element multiplied by its index.
```
 Œ∏                      Input array
‚¨§                       Do all elements satisfy
  ‚éáŒ∫                    If not first element then
          ¬ßŒ∏‚äñŒ∫          Previous element
     √ó                  Multiplied by
      ‚ÅªÔº¨Œ∏Œ∫              Number of elements remaining
    ‚Åº                   Equals
              √óŒ∫Œπ       Current element multiplied by its index
                 ‚Åº¬πŒπ    If first element then it is `1`
                        Implicitly print
```
]