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.
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, 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, 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
Offset: 1
Keywords
References
- H. Pieper, "Die komplexen Zahlen", Verlag Harri Deutsch, p. 122
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Sven Simon, List with Gaussian primes (extended) of A103431/A103432
- R. Spira, The Complex Sum Of Divisors, American Mathematical Monthly, 1961 Vol. 68, pp. 120-124.
- Wikipedia, Table of Gaussian integer factorizations
Programs
-
Maple
N:= 100: # to get all terms with norm <= N p1:= select(isprime,[seq(i,i=3..N,4)]): p2:= select(isprime,[seq(i,i=1..N^2,4)]): p2:= map(t -> GaussInt:-GIfactors(t)[2][1][1],p2): p3:= sort( [1+I, op(p1),op(p2)],(a,b) -> Re(a)^2 + Im(a)^2 < Re(b)^2 + Im(b)^2): g:= proc(z) local a,b; a:= Re(z); b:= Im(z); if b = 0 then z else a:= abs(a); b:= abs(b); if a = b then a elif a < b then a,b else b,a fi fi end proc: map(g, p3); # Robert Israel, Feb 23 2016
-
Mathematica
maxNorm = 500; norm[z_] := Re[z]^2 + Im[z]^2; m = Sqrt[maxNorm] // Ceiling; gp = Select[Table[a + b I, {a, 1, m}, {b, 0, m}] // Flatten, norm[#] <= maxNorm && PrimeQ[#, GaussianIntegers -> True]&]; SortBy[gp, norm[#] maxNorm + Abs[Re[#]]&] // Re (* Jean-François Alcover, Mar 04 2019 *)
Extensions
Edited (mostly to correct meaning of norm) by Franklin T. Adams-Watters, Mar 04 2011
a(48) corrected by Robert Israel, Feb 23 2016
Comments