OFFSET
1,6
FORMULA
a(n) = Sum_{j=1..floor(n/3)} Sum_{i=j..floor((n-j)/2)} c((j^2 + i^2 + (n-i-j)^2)/n), where c(n) = 1 - ceiling(n) + floor(n).
EXAMPLE
a(6) = 2; 6 | (1^2 + 1^2 + 4^2) = 18 and 6 | (2^2 + 2^2 + 2^2) = 12, so a(6) = 2.
MATHEMATICA
c[n_] := 1 - Ceiling[n] + Floor[n]; a[n_] := Sum[c[(j^2 + i^2 + (n - i - j)^2)/n], {j, 1, Floor[n/3]}, {i, j, Floor[(n - j)/2]}]; Array[a, 100] (* Amiram Eldar, Oct 22 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Oct 21 2021
STATUS
approved