Thank you very much for your help "jf"!
Everything you told me worked perfectly and the literature helped me alot.
But it still doesn't work properly:
Mathematica just uses 1 solution and then counts all nonnegative solution!
And if i try to change (Do[pension=...) "=" to --> ":=", i get an error message.
It would be very kind, if somebody could find the mistake why mathematica loops just 1 solution.
Attachment: basic-new.nb, URL: ,