login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60, we have over 367,000 sequences, and we’ve crossed 11,000 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052261 Smallest integer that can be expressed as the sum of n squares of positive integers in exactly n distinct ways, or 0 if no such number exists. 2
1, 50, 54, 52, 53, 54, 55, 56, 57, 61, 67, 66, 67, 68, 74, 0, 79, 83, 87, 83, 84, 88, 0, 93, 96, 105, 101, 110, 106, 102, 116, 0, 108, 0, 0, 0, 117, 0, 117, 121, 0, 125, 0, 135, 0, 0, 0, 134, 0, 137, 145, 144, 143, 0, 0, 156, 0, 0, 152, 0, 0, 157, 0, 0, 0, 169, 0, 166, 0, 166, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(16) > 119; values for a(17) through a(22) are 79, 83, 87, 83, 84, 88.
a(16) > 10000, a(23) > 10000, if they exist. - Naohiro Nomoto, Aug 22 2001
If the number of ways to write m as the sum of n squares is at least x for m in the range k^2 to 2*k^2 + 2*k + 1, it is at least x for any larger m; take the smallest square j^2 greater than x/2 and x - j^2 >= m^2 has at least x representations, none of which obviously can exceed j^2. The 0's for n=16 and 23 can be verified in this way with k=10; 32 to 35 with k=11; 36 with k=12; 38 to 49 with k=13; and 54 up with k=14. For n sufficiently large, a(n) = (index of n in A111178) + n, or 0 if n does not occur in A111178. - Franklin T. Adams-Watters, Jul 15 2006
LINKS
EXAMPLE
a(2) = 50 = 1^2 + 7^2 = 5^2 + 5^2.
MATHEMATICA
a[1] = b[1] = 1; a[2] = b[2] = 50; b[n_] := b[n] = If[a[n-1] > 0, a[n-1], b[n-1]]; a[n_] := a[n] = (an=0; For[k = b[n-1]-8, k <= b[n-1]+14, k++, pr = PowersRepresentations[k, n, 2]; If[n == Count[pr, r_ /; FreeQ[r, 0]], an = k; Break[]]]; an); Table[an = a[n]; Print[n, " ", an]; an, {n, 1, 71}](* Jean-François Alcover, Jan 27 2012 *)
PROG
(PARI) numsumsq(n, m) = local(p, i); p=1+x*O(x^m)+y*O(y^n); for(i=1, sqrtint(m), p=p/(1-x^i^2*y)); p=polcoeff(p, n, y); vector(m, i, polcoeff(p, i))
vecfind(v, x) = local(i, y); for(i=1, matsize(v)[2], if(v[i]==x, y=i; break())); y
a(n, m=1000) = v=numsumsq(n, m); vecfind(v, n) /* values must be checked */ \\ Franklin T. Adams-Watters, Jul 15 2006
CROSSREFS
Sequence in context: A320673 A081646 A215908 * A295155 A118146 A349210
KEYWORD
nonn,nice
AUTHOR
David M. Grumm (dmg(AT)head-cfa.harvard.edu), Feb 03 2000
EXTENSIONS
More terms from Franklin T. Adams-Watters, Jul 15 2006
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 2 11:04 EST 2023. Contains 367517 sequences. (Running on oeis4.)