Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 3 down vote accepted

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$.

share|improve this answer
    
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:

enter image description here

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.