The worst programming interview question I've even seen
acodersjourney.com
acodersjourney.com
Years later, you can point out that intelligence and memory are often confused for one another.
Now, if it's the only question that you ask, then it's a problem. If it's related to the job, though, then it may be more important than you imagine.
One final note: just because someone might be the right hire in the future doesn't mean that they are the right hire for the present. If the person does not have the needed skills or experience, then they are the wrong hire. In the future, after having acquired the necessary skills and experience, then they may be the perfect person for the job.
Typically we have 45 minutes to interview someone and asking a question where one has to derive a mathematical formula using induction/ calculus is not well served to gauge their programming abilities.
But I totally agree with you on your last point - just because someone is not a good hire now, does not mean they never will be - that's why even if you don't crack an interview, you can reapply in 6 months time.
But yes - the testing material in most certifications is not a good indicator of problem solving abilities and I wouldn't make any hiring decision based on them.