First 9 prime Fibonacci number: Difference between revisions
added Arturo
(→OCaml: add) |
Drkameleon (talk | contribs) (added Arturo) |
||
Line 167:
2 3 5 13 89 233 1597 28657 514229
</pre>
=={{header|Arturo}}==
<syntaxhighlight lang="arturo">fib: $[x][
if? x<2 [1]
else [(fib x-1) + (fib x-2)]
]
firstPrimeFibos: select.first:9 2..∞ 'n -> prime? fib n
loop firstPrimeFibos 'f ->
print ["F(" ++ (to :string f+1) ++ ") =" fib f]</syntaxhighlight>
{{out}}
<pre>F(3) = 2
F(4) = 3
F(5) = 5
F(7) = 13
F(11) = 89
F(13) = 233
F(17) = 1597
F(23) = 28657
F(29) = 514229</pre>
=={{header|AWK}}==
Line 206 ⟶ 230:
2 3 5 13 89 233 1597 28657 514229
</pre>
=={{header|BASIC}}==
|