Prompts user for integer N, computes function f(n).