OFFSET
0,2
MATHEMATICA
z[n_] := Sum[If[GCD[i, j] == 1, (n-i+1)(n-j+1), 0], {i, n}, {j, n}];
a[n_] := If[n == 0, 0, (z[n] + n^2 + 2n)/2];
Table[a[n], {n, 0, 33}] (* Jean-François Alcover, Sep 14 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Feb 04 2020
STATUS
approved