|
|
A363051
|
|
a(n) = Sum_{b=0..floor(sqrt(n/2)), n-b^2 is square} b.
|
|
2
|
|
|
0, 1, 0, 0, 1, 0, 0, 2, 0, 1, 0, 0, 2, 0, 0, 0, 1, 3, 0, 2, 0, 0, 0, 0, 3, 1, 0, 0, 2, 0, 0, 4, 0, 3, 0, 0, 1, 0, 0, 2, 4, 0, 0, 0, 3, 0, 0, 0, 0, 6, 0, 4, 2, 0, 0, 0, 0, 3, 0, 0, 5, 0, 0, 0, 5, 0, 0, 2, 0, 0, 0, 6, 3, 5, 0, 0, 0, 0, 0, 4, 0, 1, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,8
|
|
COMMENTS
|
|
|
LINKS
|
|
|
MAPLE
|
local x, a ;
a := 0 ;
for x from 1 do
if x^2 > n/2 then
return a;
end if;
if issqr(n-x^2) then
a := a+x ;
end if;
end do:
end proc:
|
|
MATHEMATICA
|
a[n_]:=Sum[b Boole[IntegerQ[Sqrt[n-b^2]]], {b, 0, Floor[Sqrt[n/2]]}]; Array[a, 83] (* Stefano Spezia, May 15 2023 *)
|
|
PROG
|
(Python)
from gmpy2 import *
a = lambda n: sum([b for b in range(0, isqrt(n >> 1) + 1) if is_square(n - (b*b))])
print([a(n) for n in range(1, 84)])
(Python)
from sympy.solvers.diophantine.diophantine import diop_DN
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|