8
The challenge is rather simple:
- Take a positive whole number
n
as input. - Output the
n
th Fibonacci prime number.
Input can be as an parameter to a function (and the output will be the return value), or can be taken from the command line (and outputted there).
Note: Using built in prime checking functions or Fibonacci series generators is not allowed.
Good luck!
1
possible duplicate of Fibonacci function or sequence
– Keith Randall – 2012-08-15T18:57:42.6301Is there a limit to the size? – MrZander – 2012-08-26T21:16:29.160
@MrZander Size of what? – Inkbug – 2012-08-27T05:02:58.670
Size of input/output. Do i need to account for prime_fib(1000000000000000000)? Where is the limit? – MrZander – 2012-08-27T05:58:30.210
@MrZander The algorithm should support arbitrarily large numbers, but the function may raise an out of bound exception if the result is too big for a normal int. – Inkbug – 2012-08-29T05:07:33.667