A097563 Least integer that can be written as a sum of zero or more distinct squares in exactly n ways, or -1 if no such number exists.
2, 0, 25, 50, 65, 94, 90, 110, 155, 126, 191, 170, 186, 174, 190, 211, 195, 226, 210, 231, 234, 235, 332, 255, 283, 259, 274, 275, 270, 323, 310, 286, 306, 299, 330, 381, 295, 347, 334, 319, 315, 331, 405, 339, 335, 364, 359, 351, 367, 387, 371, 370, 404, 438
Offset: 0
Examples
a(4) = 65 because we can write 65 as a sum of distinct squares in four ways: 65 = 8^2 + 1^2 = 7^2 + 4^2 = 6^2 + 5^2 + 2^2 = 6^2 + 4^2 + 3^2 + 2^2 and we cannot do this with any smaller integer. a(0) = 2 because we cannot write 2 as a sum of distinct squares and it is the smallest number with this property.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
Programs
-
Maple
gf := product(1+x^F(k), k=1..31); ser := series(gf, x=0, 1001); S := [seq(coeff(ser,x^(1*i)),i=1..1000)]; A := proc(i); x := 0; for j from 1 to nops(a) while x = 0 do > if a[j] = i then x := 1; fi; od; j-1; end; seq(A(n), n=1..67);
Extensions
Edited by Ray Chandler, Sep 01 2004
Comments