(now I can reply here, let me repeat it again)
it depend how you want to display the result to the user, you can just compute a number that represent an html page showing the numbers from 1 to n
When given a number n, and you want to display them, how will you actually compute the numbers from 1 to n? If you precalculate a table - then how will you do n+1? What about n+2?