|
|
A164098
|
|
Numbers of the form n * (k_1^2 + k_2^2 + ... + k_n^2).
|
|
0
|
|
|
1, 4, 9, 10, 16, 18, 20, 25, 26, 27, 28, 33, 34, 36, 40, 42, 48, 49, 50, 51, 52, 54, 55, 57, 58, 60, 63, 64, 65, 66, 68, 70, 72, 74, 76, 78, 80, 81, 82, 84, 85, 87, 88, 90, 91, 92, 95, 99, 100, 102, 104, 105, 106, 108, 110, 112, 114, 115, 116, 120, 121, 122, 123, 124, 125
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The k_i must all be positive integers.
Note that every integer > 33 is the sum of 5 positive squares, and for n > 5, every integer > n+13 is the sum of n positive squares. (End)
|
|
LINKS
|
|
|
EXAMPLE
|
34 = 2*(4^2 + 1^2), 42 = 3*(3^2 + 2^2 + 1^2), thus 34 and 42 are in the sequence.
|
|
PROG
|
(PARI) issumsqs(n, k) = if(n<=0||k<=0, return(k==0&&n==0)); forstep(j=sqrtint(n), max(sqrtint(n\k), 1), -1, if(issumsqs(n-j^2, k-1), return(1))); 0
isa(n)=local(ds); ds=divisors(n); for(k=1, (#ds+1)\2, if(issumsqs(n\ds[k], ds[k]), return(1))); 0
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|