Ah, my mistake. n has to have the given type a and not Integer of course.