There are only so many simple recursive procedures, and I guarantee nearly all of them are online.
That said, I do think that once students have a basic understanding of computer science all assignments should be given so that the answer are not online. And this wouldn't bee to hard, even. It would just take some effort by the professor.