login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A227091 Number of solutions to x^2 == 1 (mod n) in Z[i]/nZ[i]. 1
1, 2, 2, 4, 4, 4, 2, 8, 2, 8, 2, 8, 4, 4, 8, 8, 4, 4, 2, 16, 4, 4, 2, 16, 4, 8, 2, 8, 4, 16, 2, 8, 4, 8, 8, 8, 4, 4, 8, 32, 4, 8, 2, 8, 8, 4, 2, 16, 2, 8, 8, 16, 4, 4, 8, 16, 4, 8, 2, 32, 4, 4, 4, 8, 16, 8, 2, 16, 4, 16, 2, 16, 4, 8, 8, 8, 4, 16, 2, 32, 2, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Number of non-congruent solutions of x^2 + y^2 -1 == 2xy == 0 (mod n).

LINKS

Eric M. Schmidt, Table of n, a(n) for n = 1..1000

FORMULA

Multiplicative with a(2^e) = 2^min(e, 3); a(p^e) = 4 for p == 1 (mod 4); a(p^e) = 2 for p == 3 (mod 4). - Eric M. Schmidt, Jul 09 2013

EXAMPLE

a(4)=4 because in Z[i]/4Z[i] the equation x^2==1 (mod 4) has 4 solutions: 1, 1+2i, 3 and 3+2i.

MATHEMATICA

h[n_] := Flatten[Table[a + b I, {a, 0, n - 1}, {b, 0, n - 1}]]; a[1] = 1; a[n_] := Length@Select[h[n], Mod[#^2, n] == 1 &]; Table[a[n], {n, 2, 44}]

PROG

(Sage) def A227091(n) : return prod([4, 2^min(m, 3), 2][p%4-1] for (p, m) in factor(n)) # Eric M. Schmidt, Jul 09 2013

(PARI) a(n)=my(o=valuation(n, 2), f=factor(n>>o)[, 1]); prod(i=1, #f, if(f[i]%4==1, 4, 2))<<min(o, 3) \\ Charles R Greathouse IV, Dec 13 2013

CROSSREFS

Cf. A060594.

Sequence in context: A104202 A042946 A037202 * A165956 A263991 A065285

Adjacent sequences:  A227088 A227089 A227090 * A227092 A227093 A227094

KEYWORD

nonn,mult

AUTHOR

José María Grau Ribas, Jun 30 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 02:48 EDT 2019. Contains 323434 sequences. (Running on oeis4.)