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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A111302 Define a(1)=1. Thereafter a(n) is the smallest positive integer with the property that a(n)^2 cannot be created by summing the squares of at most n values chosen among the previous terms (with repeats allowed). 0
1, 2, 4, 9, 12, 16, 27, 49, 69, 118, 187, 305, 503, 829, 1590, 2529, 4173, 7189, 13771, 22854, 43460, 57549, 135271, 222070, 426775, 724479, 1246636, 2158543, 3713979, 6063658, 11725956, 19627746 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
No more terms < 22155000. - David Wasserman, Jan 09 2009
LINKS
EXAMPLE
a(3) <> 3 because we can write 3^2 = a(2)^2 + a(2)^2 + a(1)^2 by using not more than 3 terms.
But it is impossible to write 4^2 as the sum of at most three squares of the previous elements, thus a(3)=4.
PROG
(PARI) canMake(n, v, i, left) = local(c); if (i == 0, return(n <= left)); c = v[i]; if (n > left*c, return(0)); if (!(n%c), return(1)); forstep (j = n\c, 0, -1, if (canMake(n - j*c, v, i - 1, left - j), return(1))); 0;
v = vector(60); x = 2; for (m = 2, 61, while (canMake(x^2, v, m - 2, m), x++); v[m - 1] = x^2; print1(x, ", "); x++); \\ David Wasserman, Jan 09 2009
CROSSREFS
Sequence in context: A341239 A088901 A283147 * A241200 A092530 A154891
KEYWORD
nonn,hard
AUTHOR
EXTENSIONS
More terms from David Wasserman, Jan 09 2009
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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)