# Using Wolfram Alpha to output table of values over the integers

I'm trying to get Wolfram Alpha to output a table of values over the integers for a given function, in example:

n^2-n

1----1

4----2

9----3

... ...

(using '-'s instead of whitespace to separate the columns)

Despite being a rather simple thing my searches for a command that does this turn up nothing. Does anyone know how I can get it to do this?

-

How about Mathematica commands? This is always the best first idea when using wolfram alpha.

Table[n^2, {n,1,10}]

for instance. If you want the table of the values of $n^2$ with $n$ between $1$ and $10$.

-
Perfect, thanks! – ron33 Dec 9 '11 at 23:31
-

To get the output exactly in the form you describe in the question, you should use

TableForm[Table[{n^2,n},{n,1,k}]]


For example:

EDIT: Well, it seems this only works in Mathematica proper. Oh well.

-