OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (6,-15,20,-15,6,-1).
FORMULA
a(n) = n^3*(n+1)*(2*n+1)/6.
a(n) = n^2 * A000330(n).
Conjecture: a(n) = Sum_{k=1..n} Sum_{z=1..n} Sum_{y=1..n} Sum_{x=1..n} [GCD(f(x,y,z), n) = k] * f(x,y,z), where f(x,y,z) = x^2 + y^2 - z^2.
G.f.: x*(1 + 14*x + 21*x^2 + 4*x^3)/(1 - x)^6. - Stefano Spezia, Jun 10 2024
MATHEMATICA
nn = 34; Table[+1/3 n^5 + 1/2 n^4 + 1/6 n^3, {n, 0, nn}]
p = 2; Table[Sum[Sum[Sum[Sum[If[GCD[x^p + y^p - z^p, n] == k, x^p + y^p - z^p, 0], {x, 1, n}], {y, 1, n}], {z, 1, n}], {k, 1, n}], {n, 0, nn}]
LinearRecurrence[{6, -15, 20, -15, 6, -1}, {0, 1, 20, 126, 480, 1375}, 35] (* Hugo Pfoertner, Jun 10 2024 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mats Granvik, Jun 10 2024
STATUS
approved