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!)
A239613 a(n) = Sum_{0 < x,y,z,t <= n and gcd(x^2 + y^2 + z^2 + t^2, n)=1} gcd(x^2 + y^2 + z^2 + t^2 - 1, n). 5
1, 16, 96, 384, 960, 1536, 4032, 8192, 11664, 15360, 26400, 36864, 52416, 64512, 92160, 163840, 156672, 186624, 246240, 368640, 387072, 422400, 534336, 786432, 900000, 838656, 1259712, 1548288, 1364160, 1474560, 1785600, 3145728 (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
g4[n_] := Sum[If[GCD[x^2 + y^2+ z^2+ t^2, n] == 1, GCD[x^2 + y^2+ z^2+ t^2 - 1, n], 0], {x, 1, n}, {y, 1, n}, {z, 1, n}, {t, 1, n}]; Array[g4, 100]
PROG
(PARI) a(n) = {s = 0; for (x=1, n, for (y=1, n, for (z=1, n, for (t=1, n, if (gcd(x^2+y^2+z^2+t^2, n) == 1, s += gcd(x^2+y^2+z^2+t^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)^4)); 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: A006637 A241937 A014344 * A100313 A091079 A321851
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 March 29 00:26 EDT 2024. Contains 371264 sequences. (Running on oeis4.)