|
|
A215537
|
|
Lowest k such that k is representable as both the sum of n and of n+1 nonzero squares.
|
|
1
|
|
|
25, 17, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
25 = 5^2 = 3^2 + 4^2
17 = 4^2 + 1^2 = 3^2 + 2^2 + 2^2
12 = 2^2 + 2^2 + 2^2 = 3^2 + 1^2 + 1^2 + 1^2
after this just add 1^2 to both sides.
|
|
MAPLE
|
# true if a is representable as a sum of n squares, each square >= m^2.
isRepnSqrsMin := proc(a, n, m)
local mpr ;
if a < n*m^2 then
return false;
end if;
if n = 1 then
if a>= m^2 and issqr(a) then
true;
else
false;
end if;
else
for mpr from m to a do
if a-mpr^2 < 1 then
return false;
elif procname(a-mpr^2, n-1, mpr) then
return true;
end if;
end do:
end if;
end proc:
# true if a is representable as a sum of n positive squares.
isRepnSqrs := proc(a, n)
isRepnSqrsMin(a, n, 1) ;
end proc:
local k;
for k from 1 do
if isRepnSqrs(k, n) and isRepnSqrs(k, n+1) then
return k;
end if;
end do:
|
|
CROSSREFS
|
Cf. A000290 (representable as sum of 1 square), A000404 (sum of 2 positive squares), A000408 (sum of 3 positive squares), A000414 (sum of 4 positive squares), A047700 (sum of 5 positive squares)
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|