OFFSET
1,2
COMMENTS
Number of octonions over Z/nZ with invertible norm; i.e., number of solutions of the equation gcd(x_1^2 + ... + x_8^2, n)=1 with 0 < x_i <= n.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
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^(8*e-1), a(p^e) = (p - 1)*p^(8*e - 5)*(p^4 - 1) for odd prime p. - Andrew Howroyd, Aug 06 2018
Sum_{k=1..n} a(k) ~ c * n^9, where c = (16/141) * Product_{p prime} (1 - 1/p^2 - 1/p^5 + 1/p^6) = 0.06731687367... . - Amiram Eldar, Nov 30 2022
From Amiram Eldar, Feb 13 2024: (Start)
Dirichlet g.f.: zeta(s-8) * (1 - 1/2^(s-7)) * Product_{p prime > 2} (1 - 1/p^(s-7) - (p-1)/p^(s-3)).
Sum_{n>=1} 1/a(n) = (257*Pi^14/1312151400) * Product_{p prime} (1 - 1/p^2 - 1/p^4 + 1/p^6 + 1/p^9 + 1/p^10 + 1/p^12 - 1/p^14) = 1.00807991170717322545... . (End)
MATHEMATICA
fa=FactorInteger; lon[n_]:=Length[fa[n]]; Phi[k_, n_] := Which[Mod[k, 2] == 1, n^(k - 1)*EulerPhi[n], Mod[k, 4] ==0, n^(k - 1)*EulerPhi[n]*Product[1 - 1/fa[2n][[i, 1]]^(k/2), {i, 2, lon[2 n]}], True, n^(k - 1)*EulerPhi[n]*Product[Which[ Mod[fa[ n][[i, 1]], 4] == 3 , 1 + 1/fa[ n][[i, 1]]^(k/2), Mod[fa[ n][[i, 1]], 4] == 1, 1 - 1/fa[ n][[i, 1]]^(k/2), True, 1], {i, 1, lon[ n]}]]; Table[Phi[8, n], {n, 1, 100}]
f[p_, e_] := (p-1)*p^(8*e-1) * If[p == 2, 1, 1 - 1/p^4]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 30] (* Amiram Eldar, Feb 13 2024 *)
PROG
(PARI) a(n)={my(p=lift(Mod(sum(i=0, n-1, x^(i^2%n)), x^n-1)^8)); 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^(8*e-1), (p - 1)*p^(8*e - 5)*(p^4 - 1)))} \\ Andrew Howroyd, Aug 06 2018
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
José María Grau Ribas, Mar 18 2014
STATUS
approved