Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2013-04-13 01:24:16

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 16,873
Website

Four Square

Given a positive integer, suggest an algorithm to express it as the sum of four squares


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'Humanity is still kept intact. It remains within.' -Alokananda

Offline

#2 2013-04-13 02:16:44

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 86,771

Re: Four Square

Please give some constraints on the numbers you can use.


In mathematics, you don't understand things. You just get used to them.
Of course that result can be rigorously obtained, but who cares?
Combinatorics is Algebra and Algebra is Combinatorics.

Offline

#3 2013-04-13 08:38:21

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,526

Re: Four Square

I am guessing integers?


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#4 2013-04-13 08:39:20

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 86,771

Re: Four Square

He needs to define whether 0 is included or not.


In mathematics, you don't understand things. You just get used to them.
Of course that result can be rigorously obtained, but who cares?
Combinatorics is Algebra and Algebra is Combinatorics.

Offline

#5 2013-04-13 14:00:44

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 16,873
Website

Re: Four Square

Any thing .... Just liike bobbym does in Add 99 and post forever


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'Humanity is still kept intact. It remains within.' -Alokananda

Offline

#6 2013-04-13 14:17:19

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,526

Re: Four Square

Here's a one-liner in Mathematica:

PowersRepresentations[n,4,2]

“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#7 2013-04-13 14:20:06

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 16,873
Website

Re: Four Square

I am aware of that but that does not teach me the algorithm


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'Humanity is still kept intact. It remains within.' -Alokananda

Offline

#8 2013-04-13 14:25:30

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,526

Re: Four Square


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#9 2013-04-13 14:27:00

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 16,873
Website

Re: Four Square

Hm, by the way, do you have Mathematica?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'Humanity is still kept intact. It remains within.' -Alokananda

Offline

#10 2013-04-13 14:28:50

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,526

Re: Four Square

I do.


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#11 2013-04-13 14:32:13

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 16,873
Website

Re: Four Square

Why is it better than maxima or sage?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'Humanity is still kept intact. It remains within.' -Alokananda

Offline

#12 2013-04-13 14:34:27

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,526

Re: Four Square

That is more of a question for bobbym. I am just starting to try it out. I have a lot to learn. He has more experience with it and knows a lot things you can do in it.


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#13 2013-04-13 14:39:07

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 16,873
Website

Re: Four Square

Which do you preffer, still?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'Humanity is still kept intact. It remains within.' -Alokananda

Offline

#14 2013-04-13 14:41:55

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,526

Re: Four Square

I do not know much about either to form an opinion.


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#15 2013-04-13 14:43:13

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 16,873
Website

Re: Four Square

I thought you were an expert of Maxima


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'Humanity is still kept intact. It remains within.' -Alokananda

Offline

#16 2013-04-13 14:46:35

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,526

Re: Four Square

How'd you get that idea?


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#17 2013-04-13 14:56:15

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 16,873
Website

Re: Four Square

Wait, I will search the forum for the evidence. smile


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'Humanity is still kept intact. It remains within.' -Alokananda

Offline

#18 2013-04-13 14:57:47

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,526

Re: Four Square

Okay. But, I do not think you can prove something that is not true...


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#19 2013-04-13 15:08:32

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 16,873
Website

Re: Four Square

Well, I think I had misinterpreted someone's idea which made me believe this


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'Humanity is still kept intact. It remains within.' -Alokananda

Offline

#20 2013-04-13 15:10:42

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,526

Re: Four Square

It is possible.

Which idea is that?


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#21 2013-04-13 15:15:52

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 16,873
Website

Re: Four Square

bobbym wrote:

Sage is a powerful alternative and so is Maxima which comes with geogebra. That is what anonimnystefy used.


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'Humanity is still kept intact. It remains within.' -Alokananda

Offline

#22 2013-04-13 15:20:49

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,526

Re: Four Square

It is what I used. Now I do not use it as much, because I an trying to learn working in M.

I think that gAr uses Sage, or at least used, so, if you are considering Sage, I think he might know stuff about it.

As for Maxima, I would be glad to help with anything, as long as I know it myself.


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#23 2013-04-13 15:22:57

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 16,873
Website

Re: Four Square

Another M?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'Humanity is still kept intact. It remains within.' -Alokananda

Offline

#24 2013-04-13 15:24:02

anonimnystefy
Real Member
From: The Foundation
Registered: 2011-05-23
Posts: 15,526

Re: Four Square

There is only one M.


“Here lies the reader who will never open this book. He is forever dead.

“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

Offline

#25 2013-04-13 15:29:15

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 16,873
Website

Re: Four Square

Maxima, Mathematica


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'Humanity is still kept intact. It remains within.' -Alokananda

Offline

Board footer

Powered by FluxBB