%I #21 Nov 22 2018 06:36:44
%S 1,4,5,14,11,20,13,40,21,44,21,70,27,52,55,104,35,84,37,154,65,84,45,
%T 200,85,108,81,182,59,220,61,256,105,140,143,294,75,148,135,440,83,
%U 260,85,294,231,180,93,520,133,340,175,378,107,324,231,520,185,236
%N a(n) = n * A239612(n) / A053191(n).
%C Related to Menon's identity. See Conclusions and further work section of the arXiv file linked.
%C Multiplicative because both A239612 and A053191 are. - _Andrew Howroyd_, Aug 07 2018
%H Andrew Howroyd, <a href="/A239615/b239615.txt">Table of n, a(n) for n = 1..1000</a>
%H C. Calderón, J. M. Grau, A. Oller-Marcen, L. Toth, <a href="http://arxiv.org/abs/1403.7878">Counting invertible sums of squares modulo n and a new generalization of Euler totient function</a>, arXiv:1403.7878 [math.NT], 2014.
%t a[n_] := Sum[Boole[GCD[x^2 + y^2 + z^2, n] == 1] GCD[x^2 + y^2 + z^2 - 1, n], {x, 1, n}, {y, 1, n}, {z, 1, n}]/(n EulerPhi[n]);
%t Array[a, 60] (* _Jean-François Alcover_, Nov 22 2018 *)
%o (PARI) a(n)={my(p=lift(Mod(sum(i=0, n-1, x^(i^2%n)), x^n-1)^3)); sum(i=0, n-1, if(gcd(i,n)==1, polcoeff(p,i)*gcd((i-1)%n,n)))/(n * eulerphi(n))} \\ _Andrew Howroyd_, Aug 07 2018
%Y Cf. A239611, A239612, A239613, A239614, A079458, A053191, A227499.
%K nonn,mult
%O 1,2
%A _José María Grau Ribas_, Jun 25 2014