cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A055029 Number of inequivalent Gaussian primes of norm n.

This page as a plain text file.
%I A055029 #30 Oct 30 2022 18:19:59
%S A055029 0,0,1,0,0,2,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,
%T A055029 0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,
%U A055029 0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0
%N A055029 Number of inequivalent Gaussian primes of norm n.
%C A055029 These are the primes in the ring of integers a+bi, a and b rational integers, i = sqrt(-1).
%C A055029 Two primes are considered equivalent if they differ by multiplication by a unit (+-1, +-i).
%D A055029 R. K. Guy, Unsolved Problems in Number Theory, A16.
%D A055029 L. W. Reid, The Elements of the Theory of Algebraic Numbers, MacMillan, NY, 1910, see Chap. V.
%H A055029 Reinhard Zumkeller, <a href="/A055029/b055029.txt">Table of n, a(n) for n = 0..10000</a>
%H A055029 <a href="/index/Ga#gaussians">Index entries for Gaussian integers and primes</a>
%F A055029 a(n) = A055028(n)/4.
%F A055029 a(n) = 2 if n is a prime = 1 (mod 4); a(n) = 1 if n is 2, or p^2 where p is a prime = 3 (mod 4); a(n) = 0 otherwise. - _Franklin T. Adams-Watters_, May 05 2006
%F A055029 a(n) = if n = 2 then 1 else 2*A079260(n) + A079261(A037213(n)). - _Reinhard Zumkeller_, Nov 11 2012
%e A055029 There are 8 Gaussian primes of norm 5, +-1+-2i and +-2+-i, but only two inequivalent ones (2+-i).
%t A055029 a[n_ /; PrimeQ[n] && Mod[n, 4] == 1] = 2; a[2] = 1; a[n_ /; (p = Sqrt[n]; PrimeQ[p] && Mod[p, 4] == 3)] = 1; a[_] = 0; Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Oct 25 2011, after _Franklin T. Adams-Watters_ *)
%o A055029 (Haskell)
%o A055029 a055029 2 = 1
%o A055029 a055029 n = 2 * a079260 n + a079261 (a037213 n)
%o A055029 -- _Reinhard Zumkeller_, Nov 11 2012
%o A055029 (PARI) a(n)=if(isprime(n), if(n%4==1, 2, n==2), if(issquare(n, &n) && isprime(n) && n%4==3, 1, 0)) \\ _Charles R Greathouse IV_, Feb 07 2017
%Y A055029 Cf. A055025, A055026, A055027, A055028.
%Y A055029 Cf. A055664, A055665, A055666, A055667, A055668.
%K A055029 nonn,easy,nice
%O A055029 0,6
%A A055029 _N. J. A. Sloane_, Jun 09 2000
%E A055029 More terms from _Reiner Martin_, Jul 20 2001