login
A239615
a(n) = n * A239612(n) / A053191(n).
5
1, 4, 5, 14, 11, 20, 13, 40, 21, 44, 21, 70, 27, 52, 55, 104, 35, 84, 37, 154, 65, 84, 45, 200, 85, 108, 81, 182, 59, 220, 61, 256, 105, 140, 143, 294, 75, 148, 135, 440, 83, 260, 85, 294, 231, 180, 93, 520, 133, 340, 175, 378, 107, 324, 231, 520, 185, 236
OFFSET
1,2
COMMENTS
Related to Menon's identity. See Conclusions and further work section of the arXiv file linked.
Multiplicative because both A239612 and A053191 are. - Andrew Howroyd, Aug 07 2018
LINKS
C. Calderón, J. M. Grau, A. Oller-Marcen, L. Toth, Counting invertible sums of squares modulo n and a new generalization of Euler totient function, arXiv:1403.7878 [math.NT], 2014.
MATHEMATICA
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]);
Array[a, 60] (* Jean-François Alcover, Nov 22 2018 *)
PROG
(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
KEYWORD
nonn,mult
AUTHOR
STATUS
approved