Education

number theory

number theory

Postby DaveFash » Sat Mar 26, 2011 2:00 pm
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?
DaveFash
 
Posts: 4
Joined: Sat Feb 19, 2011 10:38 pm

Re: number theory

Postby briangilbert » Tue Mar 29, 2011 7:48 am
I 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.
briangilbert
 
Posts: 1158
Joined: Mon May 18, 2009 5:30 pm
Location: London England

Re: number theory

Postby DaveFash » 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

Postby briangilbert » Wed Apr 27, 2011 3:10 pm
So I input
Prime Numbers [-10,10]
and it responds
2 | 3 | 5 | 7 (4 primes)
Does that answer your question?
briangilbert
 
Posts: 1158
Joined: Mon May 18, 2009 5:30 pm
Location: London England

Re: number theory

Postby austin01 » Wed Jul 06, 2011 6:56 am
the number rage depends on the problem
austin01
 
Posts: 12
Joined: Wed Jul 28, 2010 10:55 pm
Location: Austin

Who is online

Users browsing this forum: No registered users and 2 guests