OFFSET
1,2
COMMENTS
Numbers of solutions to x^2 == y^2 (mod n), 2*x*y == 0 (mod n). - Andrew Howroyd, Aug 06 2018
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..10000
FORMULA
Multiplicative with a(2^e) = 2^e, a(p^e) = p^(2*floor(e/2)). - Andrew Howroyd, Aug 06 2018
Sum_{k=1..n} a(k) ~ c * n^(3/2), where c = (2/21)*(3+sqrt(2))*zeta(3/2)/zeta(3) = 0.91363892007.... - Amiram Eldar, Nov 13 2022
MATHEMATICA
invoG[n_] := invoG[n] = Sum[If[Mod[(x + I y)^2, n] == 0, 1, 0], {x, 0, n - 1}, {y, 0, n - 1}]; Table[invoG[n], {n, 1, 104}]
f[p_, e_] := p^(2*Floor[e/2]); f[2, e_] := 2^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 13 2022 *)
PROG
(PARI) a(n)={sum(i=0, n-1, sum(j=0, n-1, (i^2 - j^2)%n == 0 && 2*i*j%n == 0))} \\ Andrew Howroyd, Aug 06 2018
(PARI) a(n)={my(f=factor(n)); prod(i=1, #f~, my([p, e]=f[i, ]); p^if(p==2, e, e - e%2))} \\ Andrew Howroyd, Aug 06 2018
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
José María Grau Ribas, Apr 03 2014
STATUS
approved