A239615 a(n) = n * A239612(n) / A053191(n).
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
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..1000
- 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.
Programs
-
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 *)
-
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
Comments