login
This site is supported by donations 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; internal format)
OFFSET

1,2

COMMENTS

No more terms < 22155000. [From David Wasserman (dwasserm(AT)earthlink.net), Jan 09 2009]

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 impossbile to write 4^2 as the sum of at most three squares of the previous elements, thus a(3)=4.

PROG

Contribution from David Wasserman (dwasserm(AT)earthlink.net), Jan 09 2009: (Start)

(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; print(x); x++); (End)

CROSSREFS

Sequence in context: A175041 A182859 A088901 * A092530 A154891 A176472

Adjacent sequences:  A111299 A111300 A111301 * A111303 A111304 A111305

KEYWORD

nonn,hard

AUTHOR

Stefan Steinerberger (hansibal(AT)hotmail.com), Nov 02 2005

EXTENSIONS

More terms from David Wasserman (dwasserm(AT)earthlink.net), Jan 09 2009

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

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

Last modified February 17 00:09 EST 2012. Contains 205978 sequences.