OFFSET
0,1
MATHEMATICA
A005728[n_] := 1 + Sum[EulerPhi[i], {i, 1, n}];
Amn[m_, n_] := Sum[If[GCD[i, j] == 1, 1, 0], {i, 1, m}, {j, 1, n}];
Dmn[m_, n_] := A005728[m] + A005728[n] + 2 Sum[d = GCD[u, v]; If[d >= 1, (u+v)*EulerPhi[d]/d, 0], {u, 1, m}, {v, 1, n}] - 2*Amn[m, n];
Table[Dmn[n, n], {n, 0, 44}] (* Jean-François Alcover, Apr 18 2023, after Maple code in A358298 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon and N. J. A. Sloane, Dec 06 2022
STATUS
approved