[Question]
  [
The [Fibonacci Sequence](https://en.wikipedia.org/wiki/Fibonacci_sequence) is a sequence of positive integers where the first two elements are 1 and the rest are the sum of the previous two. It begins \$1, 1, 2, 3, 5, 8, 13\$ and continues forever.
But what if you started with numbers other than \$1, 1\$? You could start with \$3, 4\$ and have the sequence go \$3, 4, 7, 11, 18, 29\cdots\$. Or you could start with \$2, 9\$ and have it go \$2, 9, 11, 20, 31, 51 \cdots\$.
Your challenge is to take a list of positive integers and determine if it could be part of some Fibonacci-like sequence. Essentially, determine if for each element but the first two, it's equal to the sum of the previous two.
## Testcases
Truthy:
```
[1, 1, 2, 3, 5]
[6, 9, 15, 24]
[49, 71, 120, 191, 311, 502]
[3, 4, 7, 11]
```
Falsy:
```
[1, 2, 4]
[1, 1, 2, 3, 4]
[3, 4, 6, 8, 9]
[3, 9, 12, 15, 31]
[3, 4, 6, 10, 16]
[1, 1, 1, 2]
```
You can assume the input will be (non-strictly) increasing and have a length ≥ 3.
  
[Answer]
# [Shue](https://codegolf.stackexchange.com/questions/242897/golf-the-prime-numbers-in-shue), 149 bytes
```
=R
1,R=<,R
1<=<1
,<=*,
,*=*,
1*=i
i*=*i
,,R=t,R
it=t1
,t=T,
iT=T1
1,T=1,
T=L
L1=L
L,=L
LR
*=Xe
1t=e
1T=e
i,T=e
1e=e
ie=e
ei=e
e1=e
e,=e
,e=e
e=Xe
XeR
```
[Try it online!](https://tio.run/##lVVRb9MwEH73r7DKA3FrCtbeqhmEoGNI04pKBpO6gtz0ulpK7Mh2Nqax3z7OSdul3Yq2VLr4zt99vjvfpeVNWFpzcK@L0rpAHXDqbzxxIKhErZ/ZotQ5JG7WSZLJLzn9e3EhWZclsq196DBC5rCglQGfqRISzQaE4uMgINGs06k13ETtXb1eWEczqg3VDTI@elFDlJnjlox@Fxedh@0VYW@1sWVvU9d6/phM7uGSL6cy@8Iyz@Pa8VbaA/2h8gqGzlmXLDrflPPgKER1QC9toNlSOZUFNN5md1Qt4gqrwLa599WtCUS0wB6eTOEmgE8m2bTh3Y32WZEORydvh6Oj3RjxgMqZ@CJNt5TRc9MqiC20UcE6j5F6CMnKrcph25JrU1t035e5Dklddrbpqjx2VY15iLuo21n0CxWyZZKzdssV/UtnqzI5YDsFiQf/lfQ22bT1GioY4/SR9YBNxGDK2N1/qtzKMlI/xXzXrlYLz5uImtrBH8iqAEnGabuAaxCm21Q3a1KtjL4C1NF@q5sDCjtHLXUV1Or1Euc8GltFqxFHCpPY2Axc/26RPVzKuvo@Vn@N2M4da13v1oEOVgn6l3jj96gyeOGvx68ZfU/FILMmaFPBFjISKT6LVHUxtnnWCFvvK3MJSQ4m8awn2GPk@uSJHdhexCk2jSOmnobulijesZ8M7LQ36yHHimEwvdvrvXMtO5fX5ib7BtLZS6eK9UQai71U5iqDAkzwVDmgpfVez/C@sbWxm3BW5nQGS3WlbeVY/Jq/oj8/jk@/nn6hn0enKT37PqRHozEdpcfDMf1@fDakn0afhySzcwwLv@@dezkmgo/lIcf3oTwUhB/KLie8G6XoSk00LjXhCAoI0kEGBAWZcqJTmQp0T6XgJJUn5EREwaMYk648ByKCRJGi0DxKAXEZBegoRBQcBa9t0eUcxvcYGQ7lGzF9bkaEaFPGzr7xfR/m2vQdqHnC@mBistjt@O8Y52szgWjFITQlI6XT2J243Z9DA2b3guNPCP4P "Python 3 – Try It Online")
Returns "LR" for yes and "XeR" for no. Previous version didn't work for inputs like `1,1,111,` so a few bytes went into fixing that.
# Explanation
```
=R       - Right edge
1,R=<,R  - Spawn a triangle and decrement the last number
1<=<1    - Triangle passes trough the last element
,<=*,    - Triangle turns into star after last element
,*=*,    - Star passes trough commas
1*=i     - Reversibly "Decrement" the  element (i=0)
i*=*i    - Star passes trough zeros
,,R=t,R  - When done, send a test probe (t)
it=t1    - Test probe passes trough zeros, turning them to ones
,t=T,    - Upgrade test probe
iT=T1    - Still passes trough zeros
1,T=1,   - And when done, delete itself
T=L      - Or, if the left edge was reached, turn into L
L1=L     - L deletes everything to it's right
L,=L     - --||--
LR       - And finally, success
*=Xe     - Or, if the star reached the end, create error
1t=e     - Or if there weren't enough elements to delete last time, create error (b>c)
1T=e     - Same as before (a+b>c)
i,T=e    - Too many elements to delete (a+b<c) 
1e=e     - Errors propagate
ie=e     - --||--
ei=e     - --||--
e1=e     - --||--
e,=e     - --||--
,e=e     - --||--
e=Xe     - Unify error types
XeR      - Final error state
```
# Example run:
```
1,1,11,
1,1,11,R
1,1,1<,R
1,1,<1,R
1,1*,1,R
1,i,1,R
1,i,<,R
1,i*,,R
1,*i,,R
1*,i,,R
i,i,,R
i,it,R
i,t1,R
iT,1,R
T1,1,R
L1,1,R
L,1,R
L1,R
L,R
LR
```
# Example run 2
```
1,1,111,
1,1,111,R
1,1,11<,R
1,1,1<1,R
1,1,<11,R
1,1*,11,R
1,i,11,R
1,i,1<,R
1,i,<1,R
1,i*,1,R
1,*i,1,R
1*,i,1,R
i,i,1,R
i,i,<,R
i,i*,R
i,*i,R
i*,i,R
*i,i,R
Xe,i,R
Xei,R
Xe,R
XeR
```
[Answer]
# [R](https://www.r-project.org/), ~~46~~ ~~41~~ ~~42~~ 38 bytes
*Edit: Bug-fix for +1 byte thanks to pajonk, but then -4 bytes by adopting [Giuseppe's](https://codegolf.stackexchange.com/a/242967/95126) use of `head` with a negative `n`...*
```
function(x)any(diff(x)[-1]-head(x,-2))
```
[Try it online!](https://tio.run/##dY7LCsIwEEX3/YosE0igk0e1C79ERGrbYFBSkAr16@ONbiqxMAwD9zHnkeI0n3243MNtPCT/jP0cpsgX0cUXH4L3OI@KTuo6dgNfpNJCrDO85yQZRktmJHNCVL9qI1kLg4PDFqKFtMt5XWO1uAxhuVoXVpRbmGEjaFWBgP9l/xrNblQCcA/Gf2oG1194Q9txyvBNSWU@fyGkNw "R – Try It Online")
Function `not_fiblike` outputs `TRUE` if the input `x` is *not* a fibonacci-like sequence, `FALSE` if it is one.
[Answer]
# [Wolfram Mathematica](https://wolfram.com/mathematica) ~~34~~ 29 bytes
```
 2#~Drop~2==MovingMap[Tr,#,2]&
```
–5 bytes from @att
[Try it online!](https://tio.run/##VU09C4MwEN39FYGA05WaS7R1sDh0FTp0E4dQauvgByJdgv719A6lUjiOex/3Xmun97O1U/Owvs48yuU69sOCWVb0n6Z7FXYo7yNIwCr0t7HpplIeLnUuq/CYu8ApEDQIQoOIZwhcAiIlLibSMDaETuzCiFZKl1a04ghZpS9DOimK4RpltvMXbHYrxZ@pYSO4Cdc2rf5MituSPYiz5mD2Xw)
[Included the `[3,4,6,10,16]` and `[1,1,1,2]` falsey test cases from Noodle9 and DLosc, respectively.]
[Answer]
# [Python](https://www.python.org), 31 bytes
```
def f(a,*d):a+d[0]-d[1]or f(*d)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=TZBNDoIwEIX3nGKWoCWhUBRw7wncERaNtJHEAMGSyFncsNFreA4TD-Pjz5A0kzff_LxMH6-6M5eq7Ptna7QbvXOlSduSbXInkds89TI3T3lWNaBgU9fnqwEkFSWlFqWcEZ7PKGAUZgxkxygGDEHFCATS_dDnewgxVMARQs8fyxgUaECJj_m8bqXFov9OYjUJvwiWCxm8_ck_GBZmiUWm6RKcIJ1D3RSlsY_yelOORep-VrVJJnhqWjXfuPzIDw)
-3 bytes thanks to @emanresuA.
Outputs via presence of an exception or not.
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), ~~43~~ ~~38~~ 31 bytes
```
#[[;;-3]]+#[[2;;-2]]==#[[3;;]]&
```
[Try it online!](https://tio.run/##VU1LCoMwFNx7ikDATSM1P1sJFo/QvbyFlEpd6KJkFzx7Og@lpRAe88vMMsbXcxnj/Bjz1GU5DCFUlugEZAANUdcB2xCIynx/z2scZHWbeknluU9F0krgGSWsEn5TRWqUaKF5iI65A7twytQ4LZDVOL427OKXgw9HM92r3AG/xe4XRf0VC4fAS2Zfs/ovpHmt2YotfwA "Wolfram Language (Mathematica) – Try It Online")
Previously I had a 43-byte version using Partition, which simplifies to a 39-byte solution with BlockMap:
```
And@@BlockMap[Plus@@#==2#[[3]]&,#,3,1]&
```
In case it gives anyone ideas, there is a 44-byte solution using a function specifically for generating linear recurrences:
```
#==LinearRecurrence[{1,1},#[[;;2]],Tr[1^#]]&
```
[Answer]
# [R](https://www.r-project.org/), 40 bytes
```
function(l)any(diff(l,2)-head(l,-1)[-1])
```
[Try it online!](https://tio.run/##NYxBCsIwFET3PYXL/2ECnZ9GCXgTcVFag4USQXTh6WOCZjePmXnPkg5nV9I7L6/tkWXXOX9k3VKSHabufpvXmhz14njVkmQRgjB4BNWh8RERDLDpz1PEqW5sBCPhSYTRajf8zoY@7KLOvomsuTxVyxc "R – Try It Online")
Returns `FALSE` for Fibonacci-like sequences, and `TRUE` otherwise.
Slightly different approach than [Dominic van Essen's](https://codegolf.stackexchange.com/a/242953/67312), takes the lag-2 differences of `l` and compares to the list with the first and last elements removed, relying on the following idea:
\$F\_{n+1}=F\_{n}+F\_{n-1}\Rightarrow F\_n=F\_{n+1}-F\_{n-1}\$
[Answer]
# [Jelly](https://github.com/DennisMitchell/jellylanguage), 4 bytes
```
IḊw@
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m700KzUnp3LBgqWlJWm6Fss8H-7oKndYUpyUXAwV2hitFG2so2Cio2Cuo2BoFKsUC5UAAA)
```
I      differences between consecutive elements
 Ḋ     remove the first item
  w@   find the sublist index of this in the input
```
`1` is truthy and all other values are falsey.
[Answer]
# [Pari/GP](http://pari.math.u-bordeaux.fr/), 27 bytes
```
a->#Pol(Ser(a)*(1-x-x^2))<3
```
A sequence is Fibonacci-like if and only if its generating function is of the form \$\frac{a+b\ x}{1-x-x^2}\$.
[Try it online!](https://tio.run/##RU1LCsIwFLzKo24SSaD5VC1ozyC4LBGysFIoNQQX9fRxHi0K4TG/zKSYR/1MZaBLibrbXV@TuD2yiHIvjF70crdSnl2JKU0fEUl3lPI4vwErJhUNyEpFfW8U4VlFTlEToBwUtdAaiJ65BztyytY4LZAzOE1t2cUvDx@OYbpW@Q3@iv0/ivoTFjaBl@y65kwIsnwB "Pari/GP – Try It Online")
[Answer]
# [Julia](https://julialang.org/), ~~48~~ ~~44~~ 43 bytes
```
~f=0∉3:length(f).|>i->f[i]==f[i-2]+f[i-1]
```
[Try it online!](https://tio.run/##VY1NCsIwFIT3OUWWLabS/FStkF4kZOHCp5FSRCK4kK71ml4kTihChPCSmbxv5nIfw0E@UprJtp/XW@/H43SK54rq9XMIzUAueGsxG@VX@ZI@RWmdFBxHCa4F7zyLyrqN4D3cDraBo60z0Nu8qVqMHi8tMbpW4d9YB9ZgA3/SM0ZLLDKBk/rvyJb@EWjaoQzWEpJr1VKtc9L1FqY4TtUcZV0IVQpdClOzgqKSopKikiJQ6Qs)
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 32 bytes
* -1 byte by [l4m2](https://codegolf.stackexchange.com/users/76323/l4m2)
```
a=>!a.some(n=>n+a[i]-a[++i],i=1)
```
[Try it online!](https://tio.run/##dY/LCsIwEEX3fkXcNTQtzaNqF@mPhC5CbSXSJmLF3483FFxIhGEYOIeZO3f7ttv4dI9X5cN1irOOVvdHW29hnQqve19a44bKmrJ0A3Oa0zgGv4VlqpdwK@bCcEZQghHJSDtQevjhJ0Y6KC0clcEK8Jx2iAatwyQ5WtuIjIwTCjpEnqF7DJUn34zq714kvSBsnqcfxP6HTMfjBw "JavaScript (Node.js) – Try It Online")
[Answer]
# [Dyalog APL](https://www.dyalog.com/), ~~11~~ 10 bytes
```
⊃2∘↓⍷2+/⊢
```
-1 thanks to @DLosc.
[Try it online!](https://tio.run/##Pcw9CsJAEMXxq7xyBwlmZj/iHmeJKMKCQiprIUhAEGysrbyBvUeZi8RdRLsHP94/HXKzPqa83zZ9TsOw6@d5o@NVp5Po@a7jTS8vWSx1ehR4Pw2DIbDwZAIi2EMcGRfRFZEWHBmWGb4VMhYOHZjJ1JOj/9t9LWCFWGcJSW1Z/gGXVKAP)
Taking the array `1 1 2 3 5` as an example:
```
 2∘↓      Is the array with the first two elements removed         (2 3 5)
    ⍷     a subarray of
     2+/⊢ the sum of each consecutive pair of numbers in the array (2 3 5 8)
⊃         at the first position?
```
[Answer]
# [Haskell](https://www.haskell.org/), 34 bytes
```
g(a:l@(b:c:_))=a+b==c&&g l;g _=0<1
```
[Try it online!](https://tio.run/##dY7PCoJAEIfvPsUgIUp7cP9oaS106gm6hchqsUqbhdqhp99GosgsWIad/X4z@1WqOx2NsVb7KjUbv0jLNA8CqeaFlKXnaTArDbkM19SeVd2AhMPFgWtbNz24u/bWV3f31c9Aw54SwMMIcAJRNkIxgQRphFiMicD3xTDJQiwJ3jjFEoVsnMOdApOYoZnz1tgq000tUOHrl0818WsxCi7RcYIGa/Y05/TPIB3M48w@AA "Haskell – Try It Online")
* Thanks to @Laikoni for suggesting a recursive approach 1 Byte shorter
* Original solution 35 bytes
```
g l@(a:b:c)=zipWith(-)c l==b:init c
```
[Try it online!](https://tio.run/##dY7RCoIwFIbvfYqDdKGwwM2pKQy66gmCLsKLaeFGy0TXRb38OhJFZsE47Oz7z9mn5HA6GuNcA2YdyKIq6lDcdbfTVgXLsAYjRFXoVluo3VnqFgQcLh50vW4t@Nv@atXNf/ULaGBPCeBhBGICSTlBKYEcaYKYTwnH92ycZBGWHG8xxZJEbJrDnRyTmKGl99bYSDPMLVDh65dPNf5rMQqu0HGGRmv2NI/pn0E6mqelewA "Haskell – Try It Online")
[Answer]
# [Curry (PAKCS)](https://www.informatik.uni-kiel.de/%7Epakcs/), 22 bytes
-3 bytes thanks to [Wheat Wizard](https://codegolf.stackexchange.com/users/56656/wheat-wizard).
```
f(_++a:b:c:_)|a+b/=c=0
```
[Try it online!](https://tio.run/##Sy4tKqrULUjMTi7@/z9NI15bO9EqySrZKl6zJlE7Sd822dbgf25iZp6CrUKaQrShjgIQGekoGOsomMT@BwA "Curry (PAKCS) – Try It Online")
This returns nothing if the input is Fibonacci-like, and `0` otherwise.
[Answer]
# [Python 2](https://docs.python.org/2/), 39 bytes
* -3 bytes by [loopy walt](https://codegolf.stackexchange.com/users/107561/loopy-walt)
```
lambda a:map(sum,zip(a[1:-1],a))==a[2:]
```
[Try it online!](https://tio.run/##bY7dCsIwDIXvfYpethBh/VNX6JPUXkRkOLCz6LzQl68pg0GHEEI45yT58me@PSZVBn8ud0yXKzJ0CTN/vRN8x8wxSLeXEVAI7zEoF0t@jtPMBx4kMCoFTAOzUYjd6hyA9WRack1jGJKPdU911HqatKRmO9XE6KChIEVkoy/vzFZbKcyfK8RyIpytU/nUwqjrk/ID "Python 2 – Try It Online")
---
# [Python 3](https://docs.python.org/3/) + [NumPy](https://numpy.org), 35 bytes
```
lambda a:all(a[1:-1]+a[:-2]==a[2:])
```
[Try it online!](https://tio.run/##fY/dCsIwDIXvfYpctlhl/Zm6wp6k9iIiw8HWlTov9vQ1c@CVFUII5EvOOXGZH1PQuWuvecDxdkdAi8PA0El7kH6Pzh6Ub1t0ynqe@zFOaYbwGuMC@IQQdzH1YWYdC/GIKeHCnBRApQRoAbXnnP9gTgIawmriTAExBJzXX6qi1tCkJbW6UoUDkjN0QrAsEJstU95@fZu/GuT@QgHKzJpNbfn0x0x@Aw "Python 3 – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 4 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
¥¦Å?
```
Port of [*@pxeger*'s Jelly answer](https://codegolf.stackexchange.com/a/242936/52210).
[Try it online](https://tio.run/##yy9OTMpM/f//0NJDyw632v//H21iqWNuqGNoZKBjaGmoY2xoqGNqYBQLAA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfaXL/0NLDy073Gr/X@d/dLShjqGOkY6xjmmsTrSZjqWOoamOkQmQbWKpYw6UMzLQMbQ01DE2NNQxNTACihvrmOiY6xgaApkgjSZgGmKECVTaTMdCxxLMBhpnBDLR2DA2FgA).
An inversed version is also possible, but would be a [byte](https://github.com/Adriandmen/05AB1E/wiki/Codepage) longer:
```
ü+¨Å¿
```
[Try it online](https://tio.run/##yy9OTMpM/f//8B7tQysOtx7a//9/tImljrmhjqGRgY6hpaGOsaGhjqmBUSwA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfaXL/8N7tA@tONx6aP9/nf/R0YY6hjpGOsY6prE60WY6ljqGpjpGJkC2iaWOOVDOyEDH0NJQx9jQUMfUwAgobqxjomOuY2gIZII0moBpiBEmUGkzHQsdSzAbaJwRyERjw9hYAA).
**Explanation:**
```
       #  e.g. input = [49,71,120,191,311,502]
¥      # Get the deltas/forward-differences of the (implicit) input-list
       #  STACK: [22,49,71,120,191]
 ¦     # Remove the first item
       #  STACK: [49,71,120,191]
  Å?   # Check if the (implicit) input-list starts with this sublist
       #  STACK: 1
       # (after which the result is output implicitly)
ü      # For each overlapping pair of the (implicit) input-list:
 +     #  Add them together
       #   STACK: [120,191,311,502,813]
  ¨    # Remove the last item
       #   STACK: [120,191,311,502]
   Å¿  # Check if the (implicit) input-list ends with this sublist
       #   STACK: 1
       # (after which the result is output implicitly)
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), 10 bytes
```
d4L)tfGw)=
```
[Try it online!](https://tio.run/##TY3BCsIwEETvfsVcC0GTzabaQ/Ei2IN48lBaAgoiCHor1L@PEwNFCMvOzObN@za90vWJvsNwxh5rRHRIdz1V0@M4V23qDxg@uMQ0OgM@MfAGIa7G2qChFegppVJs841YjoabdxzBCkN@UcYMHFXBaNkWpi53JO8ILzp3SOnx7v/E5Z6ajvwIhWg39gs "MATL – Try It Online")
Just the usual: take the pairwise difference, discard the first, chop off the last two elements of input, compare.
---
*Alternate*:
### [MATL](https://github.com/lmendo/MATL), ~~17~~ 16 bytes
```
tnwTTZ+2YSG=s-I<
```
[Try it online!](https://tio.run/##TY0xC8IwFIR3f8XtRk1ekmpBcRGsi4sZakpAR0FdLOi/j1cDRQiPd3cv3z2u/T1fbmgbxCO2mCOhQe6f7xDiVM6n/eY1O6xzu0P8IKTcGQU@UbAKPk26SqGm5ek5SkexHG5Ec9TcrOHwWhjyi2PMwFAVjCvbyHTjHckrwoseOqT0WPN/Yoaeio78CIWoF/oL "MATL – Try It Online")
Perform a convolution of the input with `[1 1]`, circularly shift the result twice to align the sums, compare with input, and see that the last `n - 2` values match. (The last two bytes might as well be `2=` I think, but it's the same byte count anyway.)
Previous solution: `TT2&Y+3L)G&m2-tf=`  
Perform a convolution of the input with `[1 1]`, and check that the 1:n-1 values of the result (excluding the last sum) are present in the input at right index.
---
Output is all 1s (in both solutions) for truthy.
[Answer]
# [Husk](https://github.com/barbuz/Husk), ~~5~~ ~~6~~ 5 bytes
```
€¹tẊ-
```
[Try it online!](https://tio.run/##yygtzv6f@6ip8f@jpjWHdpY83NWl@////@hoE0sdc0MdQyMDHUNLQx1jQ0MdUwOjWJ1oEwvs4oY6RjomsbEA "Husk – Try It Online")
Outputs `1` for truthy (it's a fibonacci-like sequence), any other non-negative integer for falsy (it isn't a fibonacci-like sequence).
Get the pairwise differences (`Ẋ-`), remove the first one (`t`), and ~~check if this is an ordered sublist of the input~~ find the index of this sublist in the input (`€ḣ¹`), or `0` if not present.
~~Of course, it needs to be a *prefix* of the input (rather than a sublist at any other position), but I think this should be ensured since the input is increasing.~~
*Edit:* the fact that the input is increasing does *not* ensure that sublists must be prefixes (consider `1 2 4` with difference sublist `2`), so we check this by requiring that the index of the sublist must be `1`.
[Answer]
# 80386 machine code, ~~19~~ 16 bytes
```
\x49\x49\x8b\x44\x8a\x04\x2b\x04\x8a\x2b\x44\x8a\xfc\xe1\xf3\xc3
```
[Try it online!](https://tio.run/##hVHtasIwFP3dPMUlMki26vrl15xj77FKSdNUA7UdbRxF8dXX3VgZIrpBmntucnrOuUQO11J2A13KYpcpeG1MpqvR5q1LEmFMrdOdUUnCWKOk0VXJ6Mio1lDOOciNqCHV5ccKloTGbTTvv1mKNcIq4tbDGqR9tX1wcZfLuFU@1jBuZUgX15a5aIwURYFWjRFGS9ClAaMak@uUWSzd09Gj4HAgjoX1gjgo02yTBL6qAv8qFDDiONQq2bT0xXbLdyn3FFjNXds@ScTyjDPEghOHo1atzK4ureyRkEGmcl0q@KzRirW8BzmjD1lcUvc3WqP3qsot4RkiF1rOCbHhtkKX7BS1V2CnIT5W/OC7gCtwIXRhfOTW@ZoycWGOrDHSotuMCO@nVinwcJsjCn3cxl5wm49emG6KXP9EuBkLM92xu8wc/eWAyWcY/i7FjhX0o4X@P0K@HW3Sk85v49m36bpvmRdi3XTDbRj8AA)
Applying @PeterCordes's suggestion to remove `setz` saved 3 bytes. I first considered simply returning `al` as a boolean value, but then the problem is that a non-zero value will represent `false` and zero will represent `true`. I felt it's not clear-cut whether this is okay.
Now, the function works as returning the zero flag. Thus, it is not possible to be directly called from C as before. If you follow the TIO link, there is a wrapper function to interface with this assembly function returning a flag value. Since I'll usually have to write such wrapper when calling functions from other languages, I think this approach is okay.
Thanks to @Deadcode for letting me know a nice way to translate the flag to a value in the wrapper function.
**assembly (nasm)**
```
testfib: ; fastcall, ecx = length of array, edx = pointer to array
    dec ecx
    dec ecx
.loop:
    mov eax, [edx + ecx * 4 + 4]
    sub eax, [edx + ecx * 4]
    sub eax, [edx + ecx * 4 - 4]
    loopz .loop
    ret
```
[Answer]
# [Desmos](https://desmos.com/calculator), 37 bytes
```
f(l)=min(1-sign(l[3...]-l[2...]-l)^2)
```
[Try It On Desmos!](https://www.desmos.com/calculator/gc4zlbve6p)
[Try It On Desmos! - Prettified](https://www.desmos.com/calculator/2xdy0dyg2c)
Tell me if there is anything wrong. I made this answer faster than usual :D
[Answer]
# [Python 3.8 (pre-release)](https://docs.python.org/3.8/), 46 bytes
```
f=lambda n:n[2:]and(n[0]+n[1]-n[2]or f(n[1:]))
```
[Try it online!](https://tio.run/##ZY7NCsIwEITveYo9Nhih@am2BZ8k7KFSgoW6ltKLTx8nKqgIYcl8k8zsct8uN/HtsuacTvNwPY8DSS/R9TzIWEmseSfR8h6IbyslINuz1jlBzTQJxWgN4ThD3lDDRsWDoQ6sAQxFB6hjeeVqjA43bzGa2hUXvwJ8OJa5V7Ssk2xVqmatlfqtQccz8LsxfDLQ26L6DcoK7rWG/0vODw "Python 3.8 (pre-release) – Try It Online")
Recursion is shorter than doing `all(... for i,e in enumerate(n))`.
-2 by @emanresuA, -4 by @pxeger. What am I doing today...
[Answer]
# [Factor](https://factorcode.org/), 30 bytes
```
[ dup differences rest head? ]
```
[Try it online!](https://tio.run/##VY6/DoIwEId3nuL3BIaWAqKDo3FxMU7GoYEjEAVrewyG8OxYgkG9m@67P9@VOueHHc@nw3G/QaO5WjnWXDuuc4cb2ZbucPTsqM3JwVhifhlbt4xtEPQBfPQQPiUixBg@JEEGEUOqhagMqZ@TIUQmEAmBOJRLN4JCCg@H5aSE@qlmgfpbSLD2mi/xSjlZo@nMEIwXFJ1BUZcl2fl/S45RkS52uI6NNliNbw "Factor – Try It Online")
## Explanation
Does the input start with its differences sans the first?
```
              ! { 1 1 2 3 5 }
dup           ! { 1 1 2 3 5 } { 1 1 2 3 5 }
differences   ! { 1 1 2 3 5 } { 0 1 1 2 }
rest          ! { 1 1 2 3 5 } { 1 1 2 }
head?         ! t
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~58~~ ~~57~~ 51 bytes
```
r;f(a,n)int*a;{for(r=0;n-->2;)r|=*a+*++a-a[1];n=r;}
```
[Try it online!](https://tio.run/##ZZPbjpswEIbv9ymmSJE4GBXMKanL9qLqUyRcIGK2qK2zwkiNmubVSwcGiL2LHA/m@z3zewJN@NI049iL1q2Z8jo1@LW4tZfe7ctIqDB85sLr/5Z@HfhBUIf1Ma6EKntxH1ELv@pOuR7cngCv6cEg9RAfKyjhFjPAwRkkDLK72DAnnDM4oCJDSWrQhGiKrJgy8AinA94lMU5ZxA1tSlrMn6IadbEBs80FWjAr5O/tmbgwk6LJeDKQG4L9Jpj8czpDgqXXJvizTJNsbgijg1NIKKQUMgo5hYLC/pFsXivKpbs/8tK6c0rv47LyacnAoNym3KaJTRObpjZNbZrZNLNpbtPcpoVNC5vubbr3jB7I66tsBnk2/zka0TYWeXNReoDme937OMvmh@xpl3O6fuOn6@Er/jKHgblOnGU3vvjgThU7dZZX3BaJ5fbz6nX18rC7PREQBLPam5PRV/F4KTAdvRizphImBrVQ9Y4@PC1@0IuaS3mbZrpeexS1rrPTuzOer/syHfKTc8QwHLvKs@tpTPYBO48fvQ0kgq3fb72sNSoIn2F3hp0@Kcyv2dZrXZZyrXV/uo//mvZn/aLH8Pd/ "C (gcc) – Try It Online")
*Saved 6 bytes thanks to [pxeger](https://codegolf.stackexchange.com/users/97857/pxeger)!!!*
Inputs a pointer to an array on integers and its length (because pointers in C carry no length info).  
Returns \$0\$ if its a Fibonacci-like sequence or a truthy value otherwise.
[Answer]
# [C (GCC)](https://gcc.gnu.org), 44 bytes
```
f(a,n)int*a;{n=*a+*++a-a[1]||--n>2&&f(a,n);}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=XZBRSsQwEIbf9xQx4pJpk7pJ09W1rN5hX2uRUBMpaJRtFsHunsSXfVnv5DU8gRMaEIQwzPzzzzdMPk_dw1PXfTVUvNP2eNoFJ66_uWOGe-h9yEw9-nVm8izPjTCNbPd7Ifytms8nT31IMz_nj9b13pINM0VRwIjTJDTtejSH-m2LlWP0Yrj3lJ85FvjQf9hXTOAyZegAuKNhu7P0hjrzPFiK-NmL6T2DcbZhkhN8ipOSkwpQWHKyQq1CUcdaY3UVXWqBYYVZKTFUCxW7OKWxjx0JEw1RGv6B9Z8V8TKClkmKu9S0r0REuvyYfu0X)
-1 byte by inverting output, thanks to @AZTECCO
Recursive.
[Answer]
# [BQN](https://mlochbaum.github.io/BQN/index.html), ~~14~~ 13 bytes
```
+´↑∊·2⊸↓⊸⋈⊢-»
```
[Try it at BQN online REPL](https://mlochbaum.github.io/BQN/try.html#code=RmlibGlrZSDihpAgK8K04oaR4oiKwrcy4oq44oaT4oq44ouI4oqiLcK7CgpGaWJsaWtlwqgg4p+oMeKAvzHigL8y4oC/M+KAvzXigL844oC/MTMsMeKAvzHigL8y4oC/M+KAvzXigL844oC/MTTin6kK)
```
              »     # shift the input array right,
             -      # and subtract this from
            ⊢       # the input;
     ·2⊸↓           # now drop the first two elements,
          ⊸⋈       # and make a list of this list,
    ∊               # and check whether this equals
   ↑                # any prefix of the input;
×´                  # finally get the product to check if all are true.
```
[Answer]
# [J](http://jsoftware.com/), ~~38~~ 12 bytes
```
2{]E.~2+/\}:
```
Or
```
2&}.-:2+/\}:
```
-26 bytes, thanks @Jonah
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/japjXfXqjLT1Y2qt/mtypSZn5CukKZhYKpgbKhgaGSgYWhoqGBsaKpgaGMEkjRVMFMwVDA0RfEugUgVDU6BCmBhQs4IRSOV/AA "J – Try It Online")
[Answer]
# [Standard ML (MLton)](http://www.mlton.org/), ~~51~~ ~~48~~ 45 bytes
```
fun$(x::y::z::L)=x+y=z andalso$(tl L)| $_=1=1
```
[Try it online!](https://tio.run/##K87N0c3NKcnP@/8/rTRPRaPCyqrSyqrKyspH07ZCu9K2SiExLyUxpzhfRaMkR8FHs0ZBJd7W0Nbwf1lijkJJUWmqgq2CikK0mY6CpY6CoamOgpFJLBdILg2oCSpprKNgoqMAVGJoAMRmsf8B "Standard ML (MLton) – Try It Online")
-3 bytes thanks to Laikoni.
-3 bytes using `tl` to recurse instead of pattern matching.
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), ~~38~~ 37 bytes
```
\d+
$*
^((1+),(?=(1+),\2\3\b))+1+,1+$
```
[Try it online!](https://tio.run/##NYyxDsIwEEP3@44iJZyH@i5pyVB15CciBAgGFgbE/4e0EpMtW@99nt/X@9YO4Xxt9aEyHOUSAjUirMue1arXe4xKBXVojSAMjiwTCphhSVLB3HcbwUI4iTyaOBJmkLIBSf5g2o8JJ5TeusI2i/MH "Retina 0.8.2 – Try It Online") Link includes test cases. Explanation:
```
\d+
$*
```
Convert to unary.
```
^((1+),(?=(1+),\2\3\b))+
```
Repeatedly match a number, each time checking that the number two ahead is the sum of it and the next number.
```
1+,1+$
```
Match the final two numbers.
Previous 38-byte version used .NET's ability to recapture an existing named or numbered group:
```
\d+
$*
^(1+),(1+)(,(?<2>\1(?<1>\2)))+$
```
[Try it online!](https://tio.run/##NYwxCsMwFEP3f44U7FhD9P2d1FDSsZcwpYVmyJKh9P6uXegiCYmn9/bZj2c9udujlleQYZS7Y/Do4uCuF10Lm3Et6r0PQ60EoYhIMiODCWpiGUvrdQIzEUmkSSXCsICUDpj8QfsNM87ILbUL7S@RXw "Retina 0.8.2 – Try It Online") Link includes test cases. Explanation:
```
\d+
$*
```
Convert to unary.
```
^(1+),(1+)
```
Match two numbers `\1` and `\2`...
```
(,(?<2>\1(?<1>\2)))+$
```
... then repeatedly match numbers that are the sum of `\1` and `\2`, but recapture `\1` as `\2` and `\2` as the sum, so that each number has to be the sum of the previous two.
[Answer]
# APL+WIN, 26 bytes
Prompts for input
```
(¯2+⍴v)=+/(¯2↓v)=1↓-2-/v←⎕
```
[Try it online! Thanks to Dyalog Classic](https://tio.run/##RYzNCcJAEIXvU8U7KmFJZnaTuAcLEBRrCJGIEFAIBGwgelEEsQ4vVmAp28g6EcHTfPP@qkNrNseq3W9N3VZdt6tjuD5WyzDcLCkt1kpM4Xxq4uT9lCRcXv10nqTjE4a7MusxYtJek9qImqXYEIMhsMipoQIenEOcsvMo1ZMM7BmWGXkmqls4lGCmsSpw9J9wP7vADP7LOifjouUP "APL (Dyalog Classic) – Try It Online")
[Answer]
# [PowerShell Core](https://github.com/PowerShell/PowerShell), 53 bytes
```
!(3..($a=$args).length|?{$a[--$_-2]+$a[$_-1]-$a[$_]})
```
[Try it online!](https://tio.run/##fY9Bb4JAEIXv/IrRbCqku0RAbD2Ykhh7bVN7M8RQOmoNFcsuaRPkt@MABU1LuyGbCe/b994c4k9M5BajSIRxggVbT7OipzumqbNgyoJkIw0zwv1GbY93GQuWQrCVsP1rGmmwfFENfm4UuaZ5ugZ0uKd7usWBPpuDw8E1ODCVpGic9TGHCSEuMaMOeUTiTelhD@ma0ORYdLlDuwOmiBHhBFodal2jClkHkfwhtSU7gdqZut5S3T@Acg27XsWx/jWxyl3GF4gBR7iPk3kQbsXDyw5DBVn1jimUahZIJBa/DiTgK0yBrWo1QZlGin5csTV4DVtpy8fFLJUqfq/9fK82LM8iDUOUkp71eo2FwI9zQkv2n8kSSs9@mdoEgNjFb3sY8EFLzi/K/bJ5amp@p1VCruVacQI "PowerShell Core – Try It Online")
Takes a list of numbers as parameter and returns a boolean
[Answer]
# C#, ~~114~~ 113 bytes
```
var a=args;int i=0,r=0;for(;i<a.Length-2;)if(int.Parse(a[i])+int.Parse(a[i+1])!=int.Parse(a[i+++2]))r=1;return r;
```
Program expects the list to be passed as a list of command line arguments, e.g.:
```
./program 1 2 3 5 8
```
Program uses C# v9 top-level statements feature, this is a full C# program. Unwrapped:
```
var a = args;
int i = 0, r = 0;
for (; i < a.Length - 2;)
    if (int.Parse(a[i]) + int.Parse(a[i + 1]) != int.Parse(a[i++ + 2]))
        r = 1;
return r;
```
]