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!)
A235872 Number of solutions to the equation x^2=0 in the ring of Gaussian integers modulo n. 1

%I #16 Nov 13 2022 08:39:39

%S 1,2,1,4,1,2,1,8,9,2,1,4,1,2,1,16,1,18,1,4,1,2,1,8,25,2,9,4,1,2,1,32,

%T 1,2,1,36,1,2,1,8,1,2,1,4,9,2,1,16,49,50,1,4,1,18,1,8,1,2,1,4,1,2,9,

%U 64,1,2,1,4,1,2,1,72,1,2,25,4,1,2,1,16,81,2

%N Number of solutions to the equation x^2=0 in the ring of Gaussian integers modulo n.

%C Numbers of solutions to x^2 == y^2 (mod n), 2*x*y == 0 (mod n). - _Andrew Howroyd_, Aug 06 2018

%H Andrew Howroyd, <a href="/A235872/b235872.txt">Table of n, a(n) for n = 1..10000</a>

%F Multiplicative with a(2^e) = 2^e, a(p^e) = p^(2*floor(e/2)). - _Andrew Howroyd_, Aug 06 2018

%F 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

%t 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}]

%t 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 *)

%o (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

%o (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

%Y Cf. A062803, A090699.

%K nonn,mult

%O 1,2

%A _José María Grau Ribas_, Apr 03 2014

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 April 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)