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!)
A238534 Number of solutions to gcd(u^2 + v^2 + w^2 + x^2 + y^2 + z^2, n) = 1 with u, v, w, x, y, z in [0,n-1]. 6
1, 32, 504, 2048, 12400, 16128, 101136, 131072, 367416, 396800, 1611720, 1032192, 4453488, 3236352, 6249600, 8388608, 22713088, 11757312, 44576280, 25395200, 50972544, 51575040, 141611184, 66060288, 193750000, 142511616, 267846264, 207126528, 574288624 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..2000 (first 100 terms from Giovanni Resta)
Catalina Calderón, Jose Maria Grau, A. Oller-Marcén, and László Tóth, Counting invertible sums of squares modulo n and a new generalization of Euler's totient function, Publicationes Mathematicae-Debrecen, Vol. 87 (1-2) (2015), pp. 133-145; arXiv preprint, arXiv:1403.7878 [math.NT], 2014.
FORMULA
Multiplicative with a(2^e) = 2^(6*e-1), a(p^e) = (p - 1)*p^(6*e - 4)*(p^3 - (-1)^(3*(p-1)/2)) for odd prime p. - Andrew Howroyd, Aug 07 2018
From Amiram Eldar, Feb 13 2024: (Start)
Dirichlet g.f.: zeta(s-6) * (1 - 1/2^(s-5)) * Product_{p prime > 2} (1 - 1/p^(s-5) - (-1)^(3*(p-1)/2)*(p-1)/p^(s-2)).
Sum_{k=1..n} a(k) = c * n^7 + O(n^6 * log(n)), where c = (3/28) * Product_{p prime == 1 (mod 4)} (1 - 1/p^2 - 1/p^4 + 1/p^5) * Product_{p prime == 3 (mod 4)} (1 - 1/p^2 + 1/p^4 - 1/p^5) = 0.08756841635... (Calderón et al., 2015). (End)
MAPLE
f:= proc(n) local i, j, k, S1, S2, S4, S6, G;
G:= select(t -> igcd(t, n)=1, [$1..n-1]);
S1:= Array(0..n-1);
for i from 0 to n-1 do j:= i^2 mod n; S1[j]:= S1[j]+1; od;
S2:= Array(0..n-1);
for i from 0 to n-1 do
for j from 0 to n-1 do
k:= i^2 + j mod n;
S2[k]:= S2[k]+S1[j];
od od:
S4:= Array(0..n-1);
for i from 0 to n-1 do
for j from 0 to n-1 do
k:= i + j mod n;
S4[k]:= S4[k]+S2[i]*S2[j];
od od:
S6:= Array(0..n-1);
for i from 0 to n-1 do
for j from 0 to n-1 do
k:= i + j mod n;
S6[k]:= S6[k]+S4[i]*S2[j];
od od:
add(S6[i], i=G);
end proc:
f(1):= 1:
map(f, [$1..100]); # Robert Israel, Mar 05 2018
MATHEMATICA
g[n_, 6] := g[n, 6] = Sum[If[GCD[u^2+v^2+w^2+x^2+y^2+z^2, n] == 1, 1, 0], {u, n}, {v, n}, {w, n}, {x, n}, {y, n}, {z, n}]; Table[g[n, 6], {n, 1, 12}]
f[p_, e_] := (p - 1)*p^(6*e - 4)*(p^3 - (-1)^(3*(p - 1)/2)); f[2, e_] := 2^(6*e - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 30] (* Amiram Eldar, Sep 07 2023 *)
PROG
(PARI) a(n)={my(p=lift(Mod(sum(i=0, n-1, x^(i^2%n)), x^n-1)^6)); sum(i=0, n-1, if(gcd(i, n)==1, polcoeff(p, i)))} \\ Andrew Howroyd, Aug 06 2018
(PARI) a(n)={my(f=factor(n)); prod(i=1, #f~, my([p, e]=f[i, ]); if(p==2, 2^(6*e-1), (p - 1)*p^(6*e - 4)*(p^3 - (-1)^(3*(p-1)/2))))} \\ Andrew Howroyd, Aug 07 2018
CROSSREFS
Sequence in context: A220735 A010948 A022627 * A297091 A371453 A271577
KEYWORD
nonn,easy,mult
AUTHOR
EXTENSIONS
a(16)-a(29) from Giovanni Resta, Mar 05 2014
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 May 8 19:26 EDT 2024. Contains 372341 sequences. (Running on oeis4.)