login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A000164 Number of partitions of n into 3 squares (allowing part zero). 7
1, 1, 1, 1, 1, 1, 1, 0, 1, 2, 1, 1, 1, 1, 1, 0, 1, 2, 2, 1, 1, 1, 1, 0, 1, 2, 2, 2, 0, 2, 1, 0, 1, 2, 2, 1, 2, 1, 2, 0, 1, 3, 1, 1, 1, 2, 1, 0, 1, 2, 3, 2, 1, 2, 3, 0, 1, 2, 1, 2, 0, 2, 2, 0, 1, 3, 3, 1, 2, 2, 1, 0, 2, 2, 3, 2, 1, 2, 1, 0, 1, 4, 2, 2, 1, 2, 3, 0, 1, 4, 3, 1, 0, 1, 2, 0, 1, 2, 3, 3, 2, 4, 2, 0, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,10

COMMENTS

a(n) = number of triples of integers [ i, j, k] such that i >= j >= k >= 0 and n = i^2 + j^2 + k^2. - Michael Somos, Jun 05 2012

REFERENCES

E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 84.

Hirschhorn, M. D.; Some formulae for partitions into squares, DiscreteMath, 211 (2000), pp. 225-228. [From Ant King, Oct 15 2010]

LINKS

T. D. Noe, Table of n, a(n) for n = 0..10000

FORMULA

Let e(n,r,s,m) be the excess of the number of n's r(mod m) divisors over the number of its s(mod m) divisors, and let delta(n)=1 if n is a perfect square and 0 otherwise. Then, if we define alpha(n)=5delta(n)+3 delta(1/2 n)+ 4delta(1/3 n), beta(n)=4e(n,1,3,4)+3e(n,1,7,8)+3e(n,3,5,8), gamma(n)=2 sum(e(n-k^2,1,3,4),1<=k^2<n), it follows that a(n)=1/12 (alpha(n)+beta(n)+gamma(n)) - Ant King, Oct 15 2010]

EXAMPLE

1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^8 + 2*x^9 + x^10 + x^11 + x^12 + x^13 + ...

MATHEMATICA

Length[PowersRepresentations[ #, 3, 2]] & /@ Range[0, 104]

e[0, r_, s_, m_]=0; e[n_, r_, s_, m_]:=Length[Select[Divisors[n], Mod[ #, m]==r &]]-Length[Select[Divisors[n], Mod[ #, m]==s &]]; alpha[n_]:=5delta[n]+3delta[1/2 n]+4delta[1/3n]; beta[n_]:=4e[n, 1, 3, 4]+3e[n, 1, 7, 8]+3e[n, 3, 5, 8]; delta[n_]:=If[IntegerQ[Sqrt[n]], 1, 0]; f[n_]:=Table[n-k^2, {k, 1, Floor[Sqrt[n]]}]; gamma[n_]:=2 Plus@@(e[ #, 1, 3, 4] &/@f[n]); p3[n_]:=1/12(alpha[n]+beta[n]+gamma[n]); p3[ # ] &/@Range[0, 104]

(* Ant King, Oct 15 2010 *)

PROG

(PARI) {a(n) = if( n<0, 0, sum( i=0, sqrtint(n), sum( j=0, i, sum( k=0, j, n == i^2 + j^2 + k^2))))} /* Michael Somos, Jun 05 2012 */

CROSSREFS

Sequence in context: A169987 A178666 A206706 * A157746 A037820 A076493

Adjacent sequences:  A000161 A000162 A000163 * A000165 A000166 A000167

KEYWORD

nonn

AUTHOR

N. J. A. Sloane.

EXTENSIONS

Name clarified. - Wolfdieter Lang, Apr 08 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified December 22 08:33 EST 2014. Contains 252329 sequences.