OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
35 = 1^2 + 3^2 + 5^2, with 3 - 1 = 5 - 3 = 2;
371 = 1^2 + 9^2 + 17^2, with 9 - 1 = 17 - 9 = 8. Also 371 = 9^2 + 11^2 + 13^2, with 11 - 9 = 13 - 11 = 2.
MAPLE
N:= 1000: # for terms <= N
S:= {seq(seq(3*a^2+2*b^2, b=1..min(a-1, floor(sqrt((N-3*a^2)/2)))), a=1..floor(sqrt(N/3)))}:
sort(convert(S, list)); # Robert Israel, Jun 08 2020
PROG
(PARI) for(n=3, 600, k=sqrt(n/3); a=2; v=0; while(a<=k&&v==0, b=(n-3*a^2)/2; if(b==truncate(b)&&issquare(b), d=sqrt(b); if(d>=1&&d<=a-1, v=1; print1(n, ", "))); a+=1))
(PARI) w=List(); for(n=3, 600, k=sqrt(n/3); for(a=2, k, for(c=1, a-1, v=(a-c)^2+a^2+(a+c)^2; if(v==n, listput(w, n))))); print(vecsort(Vec(w), , 8))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antonio Roldán, Jan 29 2019
STATUS
approved