The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A263320 Number of regular elements in Z_n[i]. 1
 1, 3, 9, 9, 25, 27, 49, 33, 73, 75, 121, 81, 169, 147, 225, 129, 289, 219, 361, 225, 441, 363, 529, 297, 441, 507, 649, 441, 841, 675, 961, 513, 1089, 867, 1225, 657, 1369, 1083, 1521, 825, 1681, 1323, 1849, 1089 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS A Gaussian integer z is called regular (mod n) if there is a Gaussian integer x such that z^2 * x == z (mod n). From Robert Israel, Nov 30 2015: (Start) a(2^k) = 1 + 2^(2k-1) for k >= 1. a(p) = p^2 if p is an odd prime. a(p^k) = 1 - p^(2k-2) + p^(2k) if p is a prime == 3 mod 4. a(p^k) = 1 - 2 p^(k-1) + 2 p^k + p^(2k-2) - 2 p^(2k-1) + p^(2k) if p is a prime == 1 mod 4.(End) LINKS Robert Israel, Table of n, a(n) for n = 1..10000 Wikipedia, Gaussian Integer EXAMPLE a(2) = 3 because the regular elements in Z_2[i] are {0, 1, i}. MATHEMATICA regularQ[a_, b_, n_] := ! {0} == Union@Flatten@Table[If[Mod[(a + b I) - (a +  b I)^2 (x + y I),  n] == 0, x + I y, 0], {x, 0, n - 1}, {y, 0, n -1}]; Ho[1]=1; Ho[n_] := Ho[n] = Sum[If[regularQ[a, b, n], 1, 0], {a, 1, n}, {b, 1, n}]; Table[Ho[n], {n, 1, 33}] CROSSREFS Cf. A055653. Sequence in context: A269052 A268971 A267966 * A226717 A207208 A206734 Adjacent sequences:  A263317 A263318 A263319 * A263321 A263322 A263323 KEYWORD nonn,mult AUTHOR José María Grau Ribas, Oct 14 2015 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.

Last modified January 20 01:01 EST 2022. Contains 350467 sequences. (Running on oeis4.)