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.

A103431 Subsequence of the Gaussian primes, where only Gaussian primes a+bi with a>0, b>=0 are listed. Ordered by the norm N(a+bi)=a^2+b^2 and the size of the real part, when the norms are equal. a(n) is the real part of the Gaussian prime. Sequence A103432 gives the imaginary parts.

This page as a plain text file.
%I A103431 #43 Mar 04 2019 12:18:46
%S A103431 1,1,2,3,2,3,1,4,2,5,1,6,4,5,7,2,7,5,6,3,8,5,8,4,9,1,10,3,10,7,8,11,4,
%T A103431 11,7,10,6,11,2,13,9,10,7,12,1,14,2,15,8,13,4,15,1,16,10,13,9,14,5,16,
%U A103431 2,17,12,13,11,14,9,16,5,18,8,17,19,7,18,10,17,6,19,1,20,3,20,14,15,12,17
%N A103431 Subsequence of the Gaussian primes, where only Gaussian primes a+bi with a>0, b>=0 are listed. Ordered by the norm N(a+bi)=a^2+b^2 and the size of the real part, when the norms are equal. a(n) is the real part of the Gaussian prime. Sequence A103432 gives the imaginary parts.
%C A103431 Definition of Gaussian primes (Pieper, Die komplexen Zahlen, p. 122): 1) i+i, norm N(i+i) = 2. 2) Natural primes p with p = 3 mod 4, norm N(p) = p^2. 3) primes a+bi, a>0, b>0 with a^2 + b^2 = p = 1 mod 4, p natural prime. Norm N(a+bi) = p. b+ai is a different Gaussian prime number, b+ai cannot be factored into a+bi and a unit. 4) All complex numbers from 1) to 3) multiplied by the units -1,i,-i, these are the associated numbers. The sequence contains all the Gaussian primes mentioned in 1) - 3).
%C A103431 Every complex number can be factored completely into the Gaussian prime numbers defined by the sequence, an additional unit as factor can be necessary. This factorization can be used to calculate the complex sigma, as defined by Spira. The elements a(n) are ordered by the size of their norm. If the two different primes a+bi and b+ai have the same norm, they are ordered by the size of the real part of the complex prime number. So a+bi follows b+ai in the sequence, if a > b.
%C A103431 Of course this is not the only possible definition. As primes p = 1 mod 4 can be factored in p = (-i)(a+bi)(b+ai) and the norm N(a+bi) = N(b+ai) = p, these primes a+bi occur much earlier in the sequence than p does in the sequence of natural primes. 4+5i with norm 41 occurs before prime 7 with norm 49.
%D A103431 H. Pieper, "Die komplexen Zahlen", Verlag Harri Deutsch, p. 122
%H A103431 Robert Israel, <a href="/A103431/b103431.txt">Table of n, a(n) for n = 1..10000</a>
%H A103431 Sven Simon, <a href="/A103431/a103431_1.txt">List with Gaussian primes (extended) of A103431/A103432</a>
%H A103431 R. Spira, <a href="http://www.jstor.org/stable/2312472">The Complex Sum Of Divisors</a>, American Mathematical Monthly, 1961 Vol. 68, pp. 120-124.
%H A103431 Wikipedia, <a href="http://en.wikipedia.org/wiki/Table_of_Gaussian_integer_factorizations">Table of Gaussian integer factorizations</a>
%p A103431 N:= 100: # to get all terms with norm <= N
%p A103431 p1:= select(isprime,[seq(i,i=3..N,4)]):
%p A103431 p2:= select(isprime,[seq(i,i=1..N^2,4)]):
%p A103431 p2:= map(t -> GaussInt:-GIfactors(t)[2][1][1],p2):
%p A103431 p3:= sort( [1+I, op(p1),op(p2)],(a,b) -> Re(a)^2 + Im(a)^2  < Re(b)^2 + Im(b)^2):
%p A103431 g:= proc(z)
%p A103431     local a,b;
%p A103431     a:= Re(z); b:= Im(z);
%p A103431     if b = 0 then z
%p A103431     else
%p A103431       a:= abs(a);
%p A103431       b:= abs(b);
%p A103431       if a = b then a
%p A103431       elif a < b then a,b
%p A103431       else b,a
%p A103431       fi
%p A103431     fi
%p A103431 end proc:
%p A103431 map(g, p3); # _Robert Israel_, Feb 23 2016
%t A103431 maxNorm = 500;
%t A103431 norm[z_] := Re[z]^2 + Im[z]^2;
%t A103431 m = Sqrt[maxNorm] // Ceiling;
%t A103431 gp = Select[Table[a + b I, {a, 1, m}, {b, 0, m}] // Flatten, norm[#] <= maxNorm && PrimeQ[#, GaussianIntegers -> True]&];
%t A103431 SortBy[gp, norm[#] maxNorm + Abs[Re[#]]&] // Re (* _Jean-François Alcover_, Mar 04 2019 *)
%Y A103431 Cf. A103432, A055025.
%K A103431 nonn
%O A103431 1,3
%A A103431 _Sven Simon_, Feb 05 2005; corrected Feb 20 2005 and again on Aug 06 2006
%E A103431 Edited (mostly to correct meaning of norm) by _Franklin T. Adams-Watters_, Mar 04 2011
%E A103431 a(48) corrected by _Robert Israel_, Feb 23 2016