The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239612 a(n) = Sum_{0 < x,y,z <= n and gcd(x^2 + y^2 + z^2, n)=1} gcd(x^2 + y^2 + z^2 - 1, n). 5
1, 8, 30, 112, 220, 240, 546, 1280, 1134, 1760, 2310, 3360, 4212, 4368, 6600, 13312, 9520, 9072, 12654, 24640, 16380, 18480, 22770, 38400, 42500, 33696, 39366, 61152, 47908, 52800, 56730, 131072, 69300, 76160, 120120, 127008, 99900, 101232, 126360, 281600 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Related to Menon's identity. See Conclusions and further work section of the arXiv file linked.
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
g3[n_] := Sum[If[GCD[x^2 + y^2 + z^2, n] == 1, GCD[x^2 + y^2 + z^2 - 1, n], 0], {x, 1, n}, {y, 1, n}, {z, 1, n}]; Array[g3, 100]
PROG
(PARI) a(n) = {s = 0; for (x=1, n, for (y=1, n, for (z=1, n, if (gcd(x^2+y^2+z^2, n) == 1, s += gcd(x^2+y^2+z^2-1, n)); ); ); ); s; } \\ Michel Marcus, Jun 29 2014
(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)))} \\ Andrew Howroyd, Aug 07 2018
CROSSREFS
Sequence in context: A163613 A279217 A050477 * A055737 A293965 A161222
KEYWORD
nonn,mult
AUTHOR
EXTENSIONS
Keyword:mult added by Andrew Howroyd, Aug 07 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 13 00:51 EDT 2024. Contains 373362 sequences. (Running on oeis4.)