Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'squares' topicStudent Support Forum > General > "squares"

Next Comment >Help | Reply To Topic
Author Comment/Response
David
09/20/09 04:02am

I want to solve this:
x,y,z are natural numbers
x=y+3
x^2+y^2=z^2
x=?

I tried to do the following in mathematica:
list1 := Do[x^2, {x, 0, 5000, 1}]
list2 := Do[(x - 3)^2, {x, 0, 5000, 1}]
Intersection[(list1 + list2), list2]

The output is:
Intersection::normal: Nonatomic expression expected at position 2 in (2 Null)\[Intersection]Null. >>(2 Null) \[Intersection] Null

What do i do wrong?

URL: ,

Subject (listing for 'squares')
Author Date Posted
squares David 09/20/09 04:02am
Re: squares yehuda ben-s... 09/21/09 09:13am
Re: squares Lothar 09/21/09 1:56pm
Next Comment >Help | Reply To Topic