I need a way to ask wolfram for only certain type numbers within a range: (I know what the answers should be -- my question is how do I ask the question to Wolfram, to get the correct answer)

Examples

-10,10 only whole numbers

-10,10 only counting numbers

-10,10 only natural numbers

-10,10 only integers

-10,10 only primes

i.e. how can I specify a range and have wolfram only return a certain type of number in response?

## Education

### number theory

Page

**1**of**1**• [ 5 posts ]### Re: number theory

by » Tue Mar 29, 2011 7:48 amI am presuming the 10,10 at the beginning is the range. Correct me if I am wrong.

W|A accepts Mathematica code and as your question is mathematical Mathematica code is worth trying first.

Its functions take the form Function[parameters] so you try your luck with

Prime Numbers [1,5]

and you get some output.

You check the 'Input Interpretation' pod. This says W|A has interpreted your input as Primes between 1 and 5 and you are satisfied your question has been interpreted correctly,

The 'values' pod in the output has the answer 2,3,5

If it had not worked you could have delved into the Mathematica documentation at:-

http://reference.wolfram.com/mathematic ... atica.html

using its search box.

W|A accepts Mathematica code and as your question is mathematical Mathematica code is worth trying first.

Its functions take the form Function[parameters] so you try your luck with

Prime Numbers [1,5]

and you get some output.

You check the 'Input Interpretation' pod. This says W|A has interpreted your input as Primes between 1 and 5 and you are satisfied your question has been interpreted correctly,

The 'values' pod in the output has the answer 2,3,5

If it had not worked you could have delved into the Mathematica documentation at:-

http://reference.wolfram.com/mathematic ... atica.html

using its search box.

Volunteer Curator http://www.bgls11958.pwp.blueyonder.co. ... /index.htm

- briangilbert
**Posts:**1158**Joined:**Mon May 18, 2009 5:30 pm**Location:**London England

### Re: number theory

by » Wed Apr 27, 2011 7:12 am"-10,10" means the range of numbers from minus ten through plus ten.

- DaveFash
**Posts:**4**Joined:**Sat Feb 19, 2011 10:38 pm

### Re: number theory

by » Wed Apr 27, 2011 3:10 pmSo I input

Prime Numbers [-10,10]

and it responds

2 | 3 | 5 | 7 (4 primes)

Does that answer your question?

Prime Numbers [-10,10]

and it responds

2 | 3 | 5 | 7 (4 primes)

Does that answer your question?

Volunteer Curator http://www.bgls11958.pwp.blueyonder.co. ... /index.htm

- briangilbert
**Posts:**1158**Joined:**Mon May 18, 2009 5:30 pm**Location:**London England

- austin01
**Posts:**12**Joined:**Wed Jul 28, 2010 10:55 pm**Location:**Austin

Page

**1**of**1**• [ 5 posts ]### Who is online

Users browsing this forum: No registered users and 2 guests