[Question]
  [
In 2009, [Hannah Alpert described](https://www.emis.de/journals/INTEGERS/papers/j57/j57.pdf) the "far-difference" representation, a novel way of representing integers as sums and differences of Fibonacci numbers according to the following rules:
* every two terms of the same sign differ in index by at least 4, and
* every two terms with different signs differ in index by at least 3.
### Example
```
  n  | far-difference               
+----+------------------------------+
| 10 | 13 - 3     = F_5 - F_2       |
| 11 | 13 - 2     = F_5 - F_1       |
| 12 | 13 - 1     = F_5 - F_0       |
| 13 | 13         = F_5             |
| 14 | 13 + 1     = F_5 + F_0       |
| 15 | 13 + 2     = F_5 + F_1       |
| 16 | 21 - 5     = F_6 - F_3       |
| 17 | 21 - 5 + 1 = F_6 - F_3 + F_0 |
| 18 | 21 - 3     = F_6 - F_2       |
| 19 | 21 - 2     = F_6 - F_1       |
| 20 | 21 - 1     = F_6 - F_0       |
+----+------------------------------+
```
As a non-example, we do not write \$16 = 13 + 3 = F\_5 + F\_2\$ because \$13 = F\_5\$ and \$3 = F\_2\$ have the same sign and therefore violate the first rule because their index differs by \$3\$.
As another non-example, we do not write \$8 = 13 - 5 = F\_5 - F\_3\$ because \$13 = F\_5\$ and \$-5 = - F\_3\$ have different signs and violate the second rule because their index differs by \$2\$.
# Challenge
Write a program that takes an integer `n` as an input and outputs a list of numbers that describes its far-difference representation, or any other reasonable output (e.g. `[21, -5, 1]` or `"21 - 5 + 1"`.)
This is a [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") challenge, so the shortest code wins.
  
[Answer]
# [Python](https://www.python.org), 148 bytes
```
g=lambda n,j=1:n>sum(map(f,range(j,0,-4)))and g(n,j+1)or n*[1]and[f(j)]+([-x for x in g(-n)]if(n:=n-f(j))<0else g(n))
f=lambda n:n<2or f(n-1)+f(n-2)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=RZA9bsMwDIV3n0IjGUuBFXQojLhH6JrBMALVkRwbNmXIMpDeo1uWLOmdeptSSH8mgg-Pjx95_Zzf49nT7XZfo1PPXx9dNZrp7WQEyaHSJb0s6wSTmcHJYKizMMhCqidENHQSHbAt1-iDoE2tG9ZqBwM2OdTqIhzrF9ET-xRh0zugsiKVHLgv7LjYlICYub-tJe13PMVOpTFPZYc_bId-mn2Iwq3URu_HJXOi-u-2Y1iPrWnPFl49WQTHuRw1JIAHu5a6KLDMxBx6inxKl0ge8b8v-AY)
Not 100% sure about this though output looks ok.
### How?
Assuming the desired representation exists and is unique the following recursion should work: Find the smallest sum \$F\_n+F\_{n-4}+F\_{n-8}+...\$ that is at least as large as N where N is the number we wish to represent. Then the representation starts with \$F\_n\$. And now we use recursion on the difference between N and \$F\_n\$ and that's it.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 44 bytes
```
ＮθＷθ«≔⟦÷θ↔θ⟧ηＷ‹↔ΣΦ⮌η¬﹪μ⁴↔θ⊞ηΣ…⮌η²≧⁻↨η⁰θ⟦Ｉ↨η⁰
```
[Try it online!](https://tio.run/##VY9BqwIxDITP66/IMYUKIt486YogqIgexUNdiy1023XTroj42/uyPFHMaWBmviSVUW0VlMt55ZsUt6k@6xZvYjq4G@s0sITnoJgR2avH48rHhe3sReNNwuxMwaXIWoiTBMOl4t1aayL8@IdU49K6yOS97nRLGo2QsA0RN@GSXMBawkT080sVsEtk0EjoEeWjcro0ofmhjDnGizeq@T9yb6@GudYnkjBXfUrCiIP9U8WutT7isVQU8WuKE3uvnCejPOzcHw "Charcoal – Try It Online") Link is to verbose version of code. Uses my observation that the first term in the expansion of `N` is `F(n)` where `A097083(n)` is the largest term not greater than `N`, and then assumes that the remaining terms can be calculated by subtracting `F(n)` from `N` (adjusting for the sign of `N`).
```
Ｎθ
```
Input `N`.
```
Ｗθ«
```
Repeat until `N` is zero.
```
≔⟦÷θ↔θ⟧η
```
Start with the sign of `N`.
```
Ｗ‹↔ΣΦ⮌η¬﹪μ⁴↔θ
```
While `A097083(n)` is less than `N`...
```
⊞ηΣ…⮌η²
```
... calculate the next Fibonacci number.
```
≧⁻↨η⁰θ
```
Subtract `F(n)` from `N`.
```
⟦Ｉ↨η⁰
```
Output `F(n)` on its own line.
[Answer]
# JavaScript (ES6), 106 bytes
This version is based on [@Neil's insight](https://codegolf.stackexchange.com/a/255256/58563) about [A097083](https://oeis.org/A097083) and the conjectured formula from OEIS:
$$\text{A097083}(n)=\lfloor F(n+2)/\sqrt{5}\rfloor$$
Returns an array of integers.
```
f=(n,k=s=1)=>n?(g=n=>v=n<3?n:g(n-1)+g(n-2))(k+2)*v<n*n*5?f(n,k+1):[g(k)*s,...f((n-v)/s*(s*=v<n||-1),1)]:[]
```
[Try it online!](https://tio.run/##FY3BDoMgEER/heMuIBWbXiyrH2I8GCum1SyNNJz8d4qnmcN7M58pTXE@3t9fxeG15OwJWG8UySJ13MNKTF0idvee2xW4sqiuaBBhUw3K5FiyfPT@8pTFdlhhQxm1McZDIRPeooQoqZDnWXxtcWyHMftwAAsS9ilYuJJ1XZpSKObAMeyL2UO50qJMI@Y/ "JavaScript (Node.js) – Try It Online")
---
# JavaScript (ES6), 127 bytes
Returns a space-separated string such as `21 -5 1`.
```
f=(n,a=[1,-1])=>(g=([v,...a],s,p,d)=>v?g(a,s,p,-~d)||d>3&d!=5&&g(a,s-v,[p]+v+' '):s?0:o=p)(a,n)?o:f(n,[v=a[0]+a[2]||2,-v,...a])
```
[Try it online!](https://tio.run/##LY3NCsMgEIRfZXtJXPzBtPSS1uRBxIPEJLQElVg8hb66ldDL7My3y87bZpum/RU/3Ac3l7Io4plVumO8M6gGsiqiMxNCWMMSi8xVmMeV2DPxr8PjcMOtcRd1b5qT88x0NDTTFlrs0yj7oCLWjccx9Est0FlZLQ21@mqO48r4vwHLEnbiQUH3AA/POqWsjlKEKfgUtllsYa0XFFrgQxUK9SFi@QE "JavaScript (Node.js) – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 48 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
·ÅF.āæεU1®‚XgãεX*]€`ʒø`ü2εÄ`α4y.±O_-@}PsOIQ*}нøн
```
Brute-force, so very slow..
[Try it online](https://tio.run/##AVsApP9vc2FiaWX//8K3w4VGLsSBw6bOtVUxwq7igJpYZ8OjzrVYKl3igqxgLs6Uw7hgw7wyzrXDhGDOsTR5LsKxT18tQH1Qc09JUSp9w7jQvf//MjX/LS1uby1sYXp5) or [verify all few test cases](https://tio.run/##AXAAj/9vc2FiaWX/VMaSTlQrw5BWPyIg4oaSICI/Iv/Ct8OFRi7EgcOmzrVVMcKu4oCaWGfDo861WCpd4oKsYC7OlMO4YMO8Ms61w4RgzrE0eS7CsU9fLUB9UHNPWVEqfcO40L3/Ii5WLP//LS1uby1sYXp5).
**Explanation:**
```
·           # Double the (implicit) input-integer
 ÅF         # Push a list of all Fibonacci values <= this 2*input
   .ā       # Enumerate this list, pairing each with their 0-based index
     æ      # Get the powerset of this list of Fibonacci-index pairs
ε           # Map each list of pairs to:
 U          #  Pop and store the current list in variable `X`
 1®‚        #  Push pair [1,-1]
    Xg      #  Push the length of the current list `X`
      ã     #  Get the cartesian product of the [1,-1] and this length
       ε    #  Map over each list of 1s and/or -1s:
        X*  #   Multiply the values to the values in list `X`
]           # Close the nested maps
 €`         # Flatten it one level down
.Δ          # Find the first result which is truthy for:
  ø         #  Zip/transpose; swapping rows/columns
   `        #  Pop and push the list of values and indices separated to the stack
    ü2      #  Get all overlapping pairs of the indices
  ε         #  Map over each pair of indices:
   Ä        #   Get the absolute values of both indices in the pair
    `       #   Pop and push them to the stack
     α      #   Get the absolute difference between the two
   4        #   Push 4
    y       #   Push the current pair of indices again
     .±     #   Get the sign of each index
       O    #   Sum the pair of signs together (either -2; 0; or 2)
        _   #   Check if it's equal to 0 (1 if 0; 0 if -2 or 2)
         -  #   Subtract that from the 4
          @ #   Check if the earlier difference is >= this 4-signDiff
  }         #  Close the inner map
   P        #  Check if all of them were truthy by taking the product
  s         #  Swap so the list of values is at the top
   O        #  Sum them together
    IQ      #  Check if this sum is equal to the input
  *         #  Check if both were truthy
 }ø         # After the find_first: zip/transpose; swapping rows/columns
   н        # Only keep the first list of values
            # (which is output implicitly as result)
```
]