The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
a(n) = 0 if n in A022544.
a(n) > 0 if n in A001481.
LINKS
MAPLE
A363051 := proc(n)
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:
seq(A363051(n), n=1..100) ; # R. J. Mathar, Jan 31 2024
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
def A363051(n): return sum(min(a) for a in diop_DN(-1, n))>>1 # Chai Wah Wu, May 16 2023
CROSSREFS
Sequence in context: A217540 A226861 A185643 * A278515 A285709 A080101
KEYWORD
nonn
AUTHOR
Darío Clavijo, May 14 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 23:22 EDT 2024. Contains 372535 sequences. (Running on oeis4.)