OFFSET
0,2
COMMENTS
a(n)=0 for n in A047536. - Robert Israel, Nov 30 2017
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000 (n=0..200 from Seiichi Manyama)
EXAMPLE
a(1) = 3;
(1,0,0) = 1 and 1^2 + 0^2 + 0^2 = 1.
(0,1,0) = 1 and 0^2 + 1^2 + 0^2 = 1.
(0,0,1) = 1 and 0^2 + 0^2 + 1^2 = 1.
a(2) = 3;
(1,1,0) = 1 and 1^2 + 1^2 + 0^2 = 2.
(1,0,1) = 1 and 1^2 + 0^2 + 1^2 = 2.
(0,1,1) = 1 and 0^2 + 1^2 + 1^2 = 2.
a(3) = 1;
(1,1,1) = 1 and 1^2 + 1^2 + 1^2 = 3.
a(5) = 6;
(2,1,0) = 1 and 2^2 + 1^2 + 0^2 = 5.
(2,0,1) = 1 and 2^2 + 0^2 + 1^2 = 5.
(1,2,0) = 1 and 1^2 + 2^2 + 0^2 = 5.
(1,0,2) = 1 and 1^2 + 0^2 + 2^2 = 5.
(0,2,1) = 1 and 0^2 + 2^2 + 1^2 = 5.
(0,1,2) = 1 and 0^2 + 1^2 + 2^2 = 5.
MAPLE
N:= 100:
V:= Array(0..N):
for x from 0 to floor(sqrt(N/3)) do
for y from x to floor(sqrt((N-x^2)/2)) do
for z from y to floor(sqrt(N-x^2-y^2)) do
if igcd(x, y, z) = 1 then
r:= x^2 + y^2 + z^2;
m:= nops({x, y, z});
if m=3 then V[r]:= V[r]+6
elif m=2 then V[r]:= V[r]+3
else V[r]:= V[r]+1
fi
fi
od od od:
convert(V, list); # Robert Israel, Nov 30 2017
MATHEMATICA
f[n_] := Total[ Length@ Permutations@# & /@ Select[ PowersRepresentations[n, 3, 2], GCD[#[[1]], #[[2]], #[[3]]] == 1 &]]; Array[f, 90, 0] (* Robert G. Wilson v, Nov 30 2017 *)
CROSSREFS
KEYWORD
AUTHOR
Seiichi Manyama, Nov 29 2017
STATUS
approved