[Question]
  [
[Sandbox](https://codegolf.meta.stackexchange.com/a/18345/82007)
# Background (not necessary for the challenge)
A standard number theory result using the pigeonhole principle is the fact that given any natural number k, there is a Fibonacci number that is a multiple of k.
We can see this by considering modular pairs (F(n-1) % k, F(n) % k), and noting that there are only a finite number of possibilities of the pairs, while there are infinitely many pairs, so by the pigeonhole principle, there are naturals n, m such that (F(m-1) % k, F(m) % k) = (F(n-1) % k, F(n) % k). But, this implies that F(m-2) % k = F(n-2) % k, and more generally, F(m-i) % k = F(n-i) % k. Notably, if m < n, F(0) % k = F(n-m) % k. But, F(0)=0, so this means that F(n-m) is a multiple of k.
# Challenge
You must provide a program that takes in a natural k as an input and return m, the smallest Fibonacci number that is a multiple of k. This program must be irreducible in the sense that one can't remove any bytes and maintain the same functionality.
This challenge is a [code-challenge](/questions/tagged/code-challenge "show questions tagged 'code-challenge'"), as your score will be the smallest Fibonacci multiple of (the number of bytes in your program + 1). 
To find your program's score, use this TIO link: [Try it online!](https://tio.run/##hVCxCsIwEN3zFUdBSOhicROyutnJXS71agNpGtIE6dfHtmqJg/imd49773HnptAN9pDSNER/dX64e@xBQuEMNgQfoSNPBWM3amHs0Rgaw0mrwWLT6HM0QTtDvBZHBjN0C7wGKaF6Cws8hegtVKuAc8OLqY09Om0I@MVHymwIpQS1jUs0wg7W@H22l1XgJqrFjF9m9cesGHNe28B/n2nI8vxboqyESOkJ)
The lowest score for a valid response in each language wins!
# Test Cases
```
1: 1
2: 2
3: 3
4: 8
5: 5
6: 144
7: 21
8: 8
9: 144
10: 610
11: 55
12: 144
13: 13
14: 46368
15: 6765
16: 144
17: 34
18: 144
19: 2584
20: 832040
21: 21
22: 832040
23: 46368
24: 144
25: 75025
26: 10946
27: 14930352
28: 46368
29: 377
30: 1548008755920
31: 832040
32: 46368
33: 6765
34: 34
35: 102334155
36: 144
37: 4181
38: 2584
39: 317811
40: 832040
41: 6765
42: 46368
43: 701408733
44: 832040
45: 1548008755920
46: 46368
47: 987
48: 144
49: 225851433717
50: 2111485077978050
51: 14930352
52: 267914296
53: 196418
54: 14930352
55: 55
56: 46368
57: 14930352
58: 267914296
59: 591286729879
60: 1548008755920
61: 610
62: 832040
63: 46368
64: 4807526976
65: 9227465
66: 1548008755920
67: 72723460248141
68: 2584
69: 46368
70: 5358359254990966640871840
71: 190392490709135
72: 144
73: 24157817
74: 365435296162
75: 354224848179261915075
76: 2584
77: 102334155
78: 160500643816367088
79: 8944394323791464
80: 1548008755920
81: 16641027750620563662096
82: 1548008755920
83: 160500643816367088
84: 46368
85: 1134903170
86: 1725375039079340637797070384
87: 317811
88: 832040
89: 89
90: 1548008755920
91: 225851433717
92: 46368
93: 1548008755920
94: 4807526976
95: 2880067194370816120
96: 46368
97: 7778742049
98: 57602132235424755886206198685365216
99: 1548008755920
```
You can use the TIO link above to generate more test cases if needed.
**EDIT**: As there seems to be some confusion on the scoring, here is how to generate your score:
Take the number of bytes in your function, add 1, and take the result of this addition, and find the smallest Fibonacci multiple of this result.
  
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 33 bytes, score: 34
Expects a BigInt as input.
```
f=(n,x=0n,y=1n)=>y%n?f(n,y,x+y):y
```
[Try it online!](https://tio.run/##FctBCoMwEEbhvaf4NwWHpJJs2449i1gjFpkpKuJQevaY7h4Pvne3d2u/TJ/tKvoack5ciz84iDeOQtzaRZ6pPPOHM7pZTrrUAkaUOwQPxBD@5RzhWwG9yqrz0Mw6FoVCiapfPgE "JavaScript (Node.js) ‚Äì Try It Online")
[Answer]
# [R](https://www.r-project.org/), 33 bytes, score 34
```
n=scan();while(T%%n)F={T=T+F}-F;T
```
[Try it online!](https://tio.run/##K/r/P8@2ODkxT0PTujwjMydVI0RVNU/TzbY6xDZE261W18065L@xyX8A "R ‚Äì Try It Online")
I thought I was going to have to resort to a 54 byte solution for a score of 55 (and had fun making an irreducible one), but eventually found this 33 byte solution.
When coerced to integers, `F` and `T` are initially worth 0 and 1; they go through the Fibonacci sequence until `T` is divisible by `n`.
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 33 bytes, Score: 34
```
->$a {(1,1,*+*...*).first(*%%$a)}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYKvwX9dOJVGhWsNQx1BHS1tLT09PS1MvLbOouERDS1VVJVGz9n9xYqWCHlBxWn6RgqGenqGBwX8A "Perl 6 ‚Äì Try It Online")
There's no specifically redundant parts, even if it would pretty easy to golf.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 12 bytes score = 13
```
√Ü·∏û
1√á·∏ç@¬•1#√Ü·∏û
```
[Try it online!](https://tio.run/##y0rNyan8//9w28Md87gMD7c/3NHrcGipoTJY4P///4bGAA "Jelly ‚Äì Try It Online")
A full program that takes an integer and returns an integer.
[Answer]
# [Python 2](https://docs.python.org/2/), 54 bytes; score 55
```
def f(n):
 a,b=0,1
 while b/n*n!=b:a,b=b,a+b
 return b
```
[Try it online!](https://tio.run/##JY1BDoIwEEXXzinGVVupSl2S4CU8AYVBJjFTMtaop68g2//y3p@/eUpyKX0aqDXGlIFGHK24BrDzsa19AHxP/CCMZznIvo3NukffVRFQKb9UMJZFPT2z8mwdAH2ox7UIs7JkNLc@KRm/hB8kdiWuCm6jMCZFRhbUTu5kgw91vdzvNpc9muP177IrPw "Python 2 ‚Äì Try It Online")
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 12 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1), Score: 13
```
@XvU}a@MgX+1
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1hQE1nWCsx&input=MTM)
## Explanation
The shortest possible solution (below) for this is 9 bytes, which means we're looking for the lowest possible score greater than or equal to `f(10)=610`.
```
_¬©vU}a!gM
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=X6l2VX1hIWdN&input=MTM)
That gives a target length of 12 bytes as `f(13)=13`, which can easily be achieved with some ungolfing/code bowling, giving:
```
@XvU}a@MgX+1     :Implicit input of integer U
@                :Left function, taking an integer X as argument
 XvU             :  Is X divisible by U?
    }            :End function
     a           :Starting at 0, pass each integer through the right function and return the first result that returns true when passed through the left function
      @          :Right function, taking an integer X as argument
       MgX+1     :  X+1th Fibonacci number
```
## Proofs
Hopefully, showing that no one character can be removed should also suffice to show that 2 or more characters can't be removed. I'll try to add a few words of explanation to the rest of these tomorrow.
```
*{box-sizing:border-box;}html{background:#fff;}body{background:#fff;color:#000;margin:0 auto;padding:20px;max-width:600px;}p{font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:14px;line-height:20px;margin:0 0 15px;}p.link{background:#eff0f1;border-radius:3px 0 0 3px;display:inline-block;margin:0 0 10px;width:32px;}a{display:block;padding:4px;}svg{fill:#212121;height:24px;width:24px;vertical-align:middle;}svg.warning{fill:#b00020;}pre{background:#eff0f1;border-radius:0 3px 3px 0;display:inline-block;line-height:16px;margin:0 0 10px 2px;padding:8px;width:calc(100% - 34px);}code{font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,sans-serif;font-size:13px;}p>code{background:#eee;padding:1px 5px;}
```
```
<p>Click the play icon next to each programme to test it. Note that all programmes will auto-run and some, highlighted in red with a circle, may freeze or crash the tab they're running in so proceed with cautiond.</p><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=WHZVfWFATWdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>XvU}a@MgX+1</code></pre><p>Without the first <code>@</code> to open the left function the, now unmatched, closing <code>}</code> causes the programme to throw an error.</p><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QHZVfWFATWdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@vU}a@MgX+1</code></pre><p>Removing the first <code>X</code> results in <code>U</code> being auto-inserted between the <code>@</code> and the <code>v</code> and, therefore, the left function instead testing whether <code>U</code> is divisible by itself, which, of course, it is. So, no matter the input, the programme will exit after the first iteration and always return <code>1</code>.</p><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFhVfWFATWdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@XU}a@MgX+1</code></pre><p>If the <code>v</code> is removed then the <code>X</code> is ignored and the left function now tests whether <code>U</code> is truthy, which, for all non-zero inputs, it always will be. So, as above, the programme will exit after the first iteration and always return <code>1</code>.</p><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2fWFATWdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@Xv}a@MgX+1</code></pre><p>The default agrument for the <code>v</code> method when applied to an integer is <code>2</code> so, by checking if <code>X</code> is divisible by 2, this version will always return the first even Fibonacci number: <code>2</code>.<p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VWFATWdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@XvUa@MgX+1</code></pre><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1ATWdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@XvU}@MgX+1</code></pre><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1hTWdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@XvU}aMgX+1</code></pre><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1hQGdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@XvU}a@gX+1</code></pre><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1hQE1YKzE&input=MTM" target="_blank"><svg class="warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M10,16.5L16,12L10,7.5V16.5Z"/></svg></a></p><pre><code>@XvU}a@MX+1</code></pre><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1hQE1nKzE&input=MTM" target="_blank"><svg class="warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M10,16.5L16,12L10,7.5V16.5Z"/></svg></a></p><pre><code>@XvU}a@Mg+1</code></pre><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1hQE1nWDE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@XvU}a@MgX1</code></pre><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1hQE1nWCs&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@XvU}a@MgX+</code></pre>
```
---
## Alternative, 12 bytes, score: 13
Unlike the original solution above, this one can't be golfed any further.
```
¬∞√µ!gM √¶vN ¬™√ü
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=sPUhZ00g5nZOIKrf&input=MTM)
[Answer]
# [C++ (clang)](http://clang.llvm.org/), 54 bytes, score : 55
```
int F(int m,int a=1,int b=1){return a%m?F(m,a+b,a):a;}
```
[Try it online!](https://tio.run/##HY7BDoMgEETvfMWmTaNEm5QeAdubX9HLirQlETSI6cH47RSYw7w9zGxGLctVTeg@8WycmrZRgzTzGrxG@4jGBejr7LbNjh0rHDpGd6/D5h3gxT772rbYDC1SjuKIpDTQuJqSnUDSe/ZQ/hjogIkECfdbYtPQEshaw8i5mrcAUuaEhBMAh@TpTDNoZvVylSiV39dMGmpGBTlI/AM "C++ (clang) ‚Äì Try It Online")
[Answer]
# [Cubix](https://github.com/ETHproductions/cubix), 20 bytes, Score 21
```
U;;O01I%!^;u.@|W$p+q
```
[Try it online!](https://tio.run/##Sy5Nyqz4/z/U2trfwNBTVTHOulTPoSZcpUC78P9/I0MA "Cubix ‚Äì Try It Online")
Maps onto the cube as follows
```
    U ;
    ; O
0 1 I % ! ^ ; u
. @ | W $ p + q
    . .
    . .
```
[Watch it run](https://ethproductions.github.io/cubix/?code=VTs7TzAxSSUhXjt1LkB8VyRwK3E=&input=MjA=&speed=10)
Fairly basic, builds the sequence on the stack checking the % for each iteration until it is zero then outputs and exits.
* `01I` seed the stack with start of the sequence and input. `11I` would also work.
* `%!` take modulus of TOS and test for 0. Also start of the loop
* `^;U;O!$@` if 0 pop TOS, u-Turn, pop TOS and output number, a couple of no affecting commands and halt
* `;uq+p` otherwise, pop TOS, u-turn, push TOS to bottom (input), add TOS and pull BOS to top
* `$W|W` some trickery to keep the score nice while keeping it irreducible. skip the next command(W), reflect back onto the W, change the lane up onto the beginning of the loop
[Answer]
# [C (clang)](http://clang.llvm.org/), 54 bytes, score 55
```
f(n){int a=0,b=1;while(b%n){b+=a;a-=b;a=-a;}return b;}
```
[Try it online!](https://tio.run/##FcvBCoMwDADQXylCIaUtuMN2WJY/2SVVuwVcNoqyg/jttV4fvCEOM@ur1gzqNtHFMPUh0QX/b5knSLZx8sTIkRIyRca9TMta1CTc64dFwW35W@DMQj16L4/rDd2vNMnQ2fFu7PjULkjIIM61dgA "C (clang) ‚Äì Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), score: 8 (7 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage))
```
‚àû√Öf.ŒîI√ñ
```
[Try it online](https://tio.run/##yy9OTMpM/f//Uce8w61peuemeB6e9v@/BQA) or [verify the first \$n\$ outputs](https://tio.run/##ASkA1v9vc2FiaWX/RU7CqT8iIOKGkiAiP//iiJ7DhWYuzpTCrsOW/30s/zEwMA).
**Explanation:**
```
‚àû        # Push an infinite list: [1,2,3,...]
 √Öf      # Get the n'th Fibonacci number for each value in this list
   .Œî    # Leave the first value of this list which is truthy for:
      √ñ  #  Is it divisible by
     I   #  The input
         # (after which this is output implicitly as result)
```
These are all the possible builtins after removing one or multiple characters of the program, none of which are able to have the same functionality as the full program above:
```
‚àû   # Push an infinite list: [1,2,3,...]
√Öf  # Get the `a`'th Fibonacci number
f   # Get the prime factors of the given number(s) `a`
.Œî  # Leave the first value of the given list `a` which is truthy for
Œî   # Repeat the inner code until the result no longer changes
√ÖŒî  # Get the (0-based) index of the first element of list `a` which is truthy for
√ñ   # Check if integer `a` is divisible by `b`
I   # Push the input
.I  # Get the `a`'th permutation of `b`
√Ö   # No-op
.   # No-op
```
[Answer]
# [SNOBOL4 (CSNOBOL4)](http://www.snobol4.org/csnobol4/), 71 bytes, score 144
```
	N =INPUT
	T =1
F	F =(T =F + T) - F
	OUTPUT =T EQ(REMDR(T,N))	:F(F)
END
```
[Try it online!](https://tio.run/##DcoxDoAgDAXQuZzijxB1wDiZdIMmDqKScgFnI4P3D7K94X1vveuztEYJvKWzqCEFeyMkYNspGKAOE8TQUbQPsCJeNsc9ZKtjco5WseJMTKE1P/8 "SNOBOL4 (CSNOBOL4) ‚Äì Try It Online")
This might also be the most golfed version of this program, which would be interesting; I also learned that inline assignment works...
[Answer]
# [Red](http://www.red-lang.org), 54 bytes, score 55
```
func[n][a: 0 b: 1 until[t: a a: b(b: t + b)// n = 0]b]
```
[Try it online!](https://tio.run/##JchBCsIwEEDRfU/x6UoRaRW6MKCHcDvMIrEJFGQoYXr@GHD5Xs1re@dVdCihlcM@YioxMJMCNw7z7SseiPRMp57OhXSeJownsyZtNe85ejf3B7LXzRwxxutrpGCqw/8Ky9J@ "Red ‚Äì Try It Online")
In fact it doesn't work in Red console after removing the space in front of `n`:
```
>> f: func[n][a: 0 b: 1 until[t: a a: b(b: t + b)//n = 0]b]
== func [n][a: 0 b: 1 until [t: a a: b (b: t + b) / /n = 0] b]
>> f 55
*** Script Error: / does not allow refinement! for its value2 argument
*** Where: /
*** Stack: f 
```
so I thiink it's a valid submission. I suppose there are some subtle differences in [Red](http://www.red-lang.org) for Win and Linux
## Alternative:
# [Red](http://www.red-lang.org), 67 bytes, score 2584
```
func[n][set[a b][0 1]until[set[t a]reduce[a b]zero?(b: t + b)% n]b]
```
[Try it online!](https://tio.run/##JcoxCsJAEEbhPqf4CQgRETSQIin0DrbDFLvZWQiEMUxmGy@/Smy/90xSfUkibvJUc9GZlGkXp4DIdMOdi/qyHuQIbJLKLEf9iL2fXZzguCCeT1COXE02CQ4F@hG02aIOUrTXR4v8W7j5W8Yw1C8 "Red ‚Äì Try It Online")
[Answer]
# [MATL](https://github.com/lmendo/MATL), (12 bytes), score 13
```
Ol`tb+tG\]wx
```
[Try it online!](https://tio.run/##y00syfn/3z8noSRJu8Q9Jra84v9/QxMA)
## Explanation
```
O       % Push 0
l       % Push 1
`       % Do...while. The stack contains F(k), F(k+1)
  tb+   %   Duplicate, bubble up, add. The stack contains F(k+1), F(k+2)
  t     %   Duplicate
  G     %   Push input
  \     %   Modulo
]       % End. If top of the stack is nonzero the loop continues
wx      % Swap, delete. This leaves only the latest Fibonacci number
        % Implicitly display
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 20 bytes, score 21
```
‚äûœÖ¬¨œÖÔº∑‚åäÔπ™œÖÔº©Œ∏‚äûœÖŒ£‚Ä¶‚ÆåœÖ¬≤Ôº©‚äüœÖ
```
[Try it online!](https://tio.run/##NYwxDsIwDEV3TpHRkcrCwMKYuSiCE0SppURya0jiIk5vkkr88eu9F1MokQOpeqkJZDJ3biDW3k6flAkNzHnLq6ww8yLEg3ChNnjbPvOXnh1w30joEr/ggTuWij0zmYsdLV/y1uAQfQdknKpXPe/0Aw "Charcoal ‚Äì Try It Online") Link is to verbose version of code. Explanation:
```
‚äûœÖ¬¨œÖ
```
Take the logical not of the predefined empty list and push that to the list. (Using a literal 1 would increase my score of course.)
```
Ôº∑‚åäÔπ™œÖÔº©Œ∏
```
Divide each member of the list by the input and repeat while the minimum remainder is nonzero.
```
‚äûœÖŒ£‚Ä¶‚ÆåœÖ¬≤
```
Reverse the list, take the first (originally last) two elements (duplicates the single element in the first pass), take the sum, and push that to the list.
```
Ôº©‚äüœÖ
```
Cast the last element of the list to string for implicit print.
[Answer]
# **C++, 60 bytes, score : 610**
```
long f(int m){long a=0,b=1;while(b%m){b+=a;a=b-a;}return b;}
```
If I had used `int` all the way, I would have had a score of `591286729879`!
[Try it online!](https://tio.run/##XYtBCoMwFAX3OcXHUoi0gl0VjHHbZc/wE6MGTAwmaSni2dPUZXczw3vSuWqUMp20lXPsFbR68WFVaDoSvbYjWDTKO5QKfOhZmpfcBqptAFNuhyGvr4Lf2HvSs6LinLu4cGTIRYVsX1WIqwXB9nS8UFtawkYADmUZ5BIDtC0UD/1SEKYPCPQKmoKB1Ba67m/2jMFlbKD46UBNychO0r3@Ag "C++ (gcc) ‚Äì Try It Online")
[Answer]
# APL(NARS), chars 44, bytes 88, score 89
```
r‚Üêu w
a‚Üê1‚ãÑ‚éïct‚Üê0‚ãÑr‚Üê1x
‚Üí0√ó‚ç≥0=w‚à£r‚ãÑr+‚Üêa‚ãÑa‚Üêr-a‚ãÑ‚Üí2
```
The above has the problem change the global variable ‚éïct, and not
define the variable 'a' as local (so if there is one extern global variable name 'a' and a extern function use 'a' or ‚éïct even trhu some operation, that extern function could return the wrong result...).
test:
```
  (1..8),¬®u¬®1..8
 1 1  2 2  3 3  4 8  5 5  6 144  7 21  8 8 
  u 70
5358359254990966640871840 
  u 89
89 
  u 7373
1895175617433302745829870137958720928499852361085393597796453313487
  4796286293483889267053950822315526092023966574765828063258184
  5381860131060934476214808351544411531275197835352771384243811
  1374862903608742278191775434865737602577844700159135211456619
  9731096037977185178018629433653291613989743478589685505639564
  4857727724829027387848536067017682345714489064874396569806069
  164055864141425 
```
I copy "r+‚Üêa‚ãÑa‚Üêr-a" from <https://codegolf.stackexchange.com/a/196929/58988>
[Answer]
# [Ruby](https://www.ruby-lang.org/), 33 bytes, score 34
```
->n{a=b=1;a=b+b=a until b%n==0;b}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf1y6vOtE2ydbQGkhqJ9kmKpTmlWTmKCSp5tnaGlgn1f4vUEiLNjaJ/Q8A "Ruby ‚Äì Try It Online")
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 28 bytes, score 377
```
for(a=o=1;o%i;t=a,a+=o,o=t);
```
**Edit:** -2 bytes
[Try it online!](https://tio.run/##BcFhCoAgDAbQ0wRKFtS/GDvMMIuF@IWOrr/ee@STkbu@tjScxZX3wy/0IAzeCJOSsSSZGQlskTyjDdSyVtwB0X8 "JavaScript (Node.js) ‚Äì Try It Online")
Input goes in `i`, output goes in `o` üòÖ
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 33 bytes, Score:34
Based off xibu's answer.
```
int F(m,a,b){m=a%m?F(m,a+b,a):a;}
```
[Try it online!](https://tio.run/##HYpBDoIwEEX3PcUE06STjkZcWtAdp3BTWtFJaDGIK8LZa8vbvPyf544v59KBoxt//gnNd/E8nd63xHGBTgWy1OMaWivDfZ@6J4tXa7YkShIsR4ViFZAZphlUeRlaqE1WA5dztta4B4XPnItBVdKD9I9YEVOnmGqqEY3YRPoD "C (gcc) ‚Äì Try It Online")
]