Fun with Functions I

Computer Science Level 3

Given the function fun(x) as defined as:

fun(0) = 24, fun(1) = 42
fun(x) = x * fun(x - 1) + fun(x - 2)


Let F equal fun(1000). What are the last 3 digits of F?

Details and assumptions

Try writing your program so that it takes only 1 second to run.

×