mersenneforum.org > Math Representation of integer as sum of squares
 User Name Remember Me? Password
 Register FAQ Search Today's Posts Mark Forums Read

 2007-10-26, 18:38 #1 kpatsak   Oct 2007 3 Posts Representation of integer as sum of squares Is there a formula that gives the number of representations of n as a sum four squares? Any help would be more than appreciated.
 2007-10-27, 09:22 #2 cheesehead     "Richard B. Woods" Aug 2002 Wisconsin USA 22·3·641 Posts If you haven't already seen it, let me introduce you to The On-Line Encyclopedia of Integer Sequences (OEIS) at http://www.research.att.com/~njas/sequences/. (If you have seen it, did you know you could use its search function on words, not just numbers?) Try OEIS search on "sum four squares". Last fiddled with by cheesehead on 2007-10-27 at 09:25
 2007-10-27, 10:26 #3 kpatsak   Oct 2007 38 Posts The encyclopedia I have seen this encyclopedia, moreover I have searched it. It doesn't contain the sequence that I want and for many of the sequences it does not contain it's formula
2007-10-27, 22:10   #4
R. Gerbicz

"Robert Gerbicz"
Oct 2005
Hungary

2·3·11·23 Posts

Quote:
 Originally Posted by kpatsak Is there a formula that gives the number of representations of n as a sum four squares? Any help would be more than appreciated.
It's well known: f[n]=8*sum((d|n)&&(d%4>0),d)
See:
http://mathworld.wolfram.com/SumofSquaresFunction.html

2007-10-29, 17:53   #5

"Richard B. Woods"
Aug 2002
Wisconsin USA

22×3×641 Posts

Quote:
 Originally Posted by kpatsak I have seen this encyclopedia, moreover I have searched it. It doesn't contain the sequence that I want and for many of the sequences it does not contain it's formula
When I searched OEIS on "sum four squares" the second page of returned results included

http://www.research.att.com/~njas/sequences/A000118 "Number of ways of writing n as a sum of 4 squares"

which looks like "number of representations of n as a sum four squares". Among the several given formulas seems (to me) to be one equivalent to what R. Gerbicz quoted above.

If A000118 (1,8,24,32,24,48,96,64,24,104,144,96,96,112,...) isn't what you want, can you list a few specific values of what you seek?

Last fiddled with by cheesehead on 2007-10-29 at 18:26 Reason: Quoted terms from A000118

 Similar Threads Thread Thread Starter Forum Replies Last Post mahbel Miscellaneous Math 192 2017-06-30 13:44 jasong Miscellaneous Math 5 2016-04-24 03:40 Raman Math 0 2013-01-04 00:29 tytus Other Mathematical Topics 95 2012-09-11 20:52 only_human Miscellaneous Math 9 2009-02-23 00:11

All times are UTC. The time now is 14:28.

Mon Nov 29 14:28:37 UTC 2021 up 129 days, 8:57, 0 users, load averages: 1.20, 1.32, 1.33