OFFSET
0,6
COMMENTS
The range of the sequence is {0, 1, 4, 6, 8, 9, 10, 12, 16, 18, 20, 22, 24, 28, 30, 32, 36, 38, 39, 40, ...}, cf. A248807. - M. F. Hasler, Oct 14 2014
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = sum x*y for integers x,y such that x^2+y^2=n and x>0,y>=0. - Cristóbal Camarero, Oct 03 2014
If a(n)>0, then a(n)>=2*sqrt(n-1) except for a(2)=1 and a(8)=4. Proof: The extremal values a nonzero term x*y in the above sum can have is x=1, y=sqrt(n-1) in which case it occurs a second time with x,y swapped (except for x=y=1), and x=y=sqrt(n/2) in which case it may occur only once, but x*y=n/2 is larger than 2*sqrt(n-1) for n>=15. - M. F. Hasler, Oct 14 2014
MAPLE
seq( add(T[1]*sqrt(T[2]), T in select(T->issqr(T[2]), [seq([x, n-x**2], x=1..n)]) ) , n=1..50); # Cristóbal Camarero, Oct 03 2014
PROG
(PARI) N=66; q='q+O('q^N); concat([0, 0], Vec( sum(n=0, N, n*q^(n^2))^2 )) \\ Joerg Arndt, Oct 13 2014
(PARI) A037214(n)={my(y); sum(x=1, sqrtint(n\2), if(issquare(n-x^2, &y), x*y))*2-if(n%2==0 && issquare(n\2), n\2)} \\ M. F. Hasler, Oct 14 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved