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.

Showing 1-3 of 3 results.

A239397 Prime Gaussian integers x + y*i sorted by norm and increasing y, with x and y nonnegative.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 3, 0, 0, 3, 3, 2, 2, 3, 4, 1, 1, 4, 5, 2, 2, 5, 6, 1, 1, 6, 5, 4, 4, 5, 7, 0, 0, 7, 7, 2, 2, 7, 6, 5, 5, 6, 8, 3, 3, 8, 8, 5, 5, 8, 9, 4, 4, 9, 10, 1, 1, 10, 10, 3, 3, 10, 8, 7, 7, 8, 11, 0, 0, 11, 11, 4, 4, 11, 10, 7, 7, 10, 11, 6, 6, 11, 13, 2
Offset: 1

Views

Author

T. D. Noe, Mar 22 2014

Keywords

Comments

After the number 1 + i, there are exactly two Gaussian primes here for each norm in A055025; if x + y*i is here, then y + x*i is also. - T. D. Noe, Mar 26 2014
Sequence A239621 provides a more condensed version, without y + x*i following each x + y*i. The real parts and imaginary parts are listed in A300587 and A300588. - M. F. Hasler, Mar 09 2018

Examples

			The sequence of Gaussian primes (with nonnegative real and imaginary part) begins 1+i, 2+i, 1+2i, 3, 3i,...
		

Crossrefs

Cf. A055025 (norms of Gaussian primes), A239621, A300587, A300588.

Programs

  • Mathematica
    mx = 20; lst = Flatten[Table[{a, b}, {a, 0, mx}, {b, 0, mx}], 1]; qq = Select[lst, Norm[#] <= mx && PrimeQ[#[[1]] + I*#[[2]], GaussianIntegers -> True] &]; Sort[qq, Norm[#1] < Norm[#2] &]
  • PARI
    is_GP(x,y=0)={(x=factor(if(imag(x+I*y),x+I*y,I*x+y)))&&vecsum(x[,2])==1+(abs(x[1,1])==1)} \\ Returns 1 iff x + iy (y may be omitted) is a Gaussian prime. -  M. F. Hasler, Mar 10 2018
    
  • PARI
    for(N=2,499, if(isprime(N) && N%4<3, z=factor(I*N); for(i=0,N>2, print1(real(z[i+1,1])","imag(z[i+1,1])",")), issquare(N,&z) && isprime(z) && z%4==3 && print1(z",0,0,"z","))) \\ M. F. Hasler, Mar 10 2018

Formula

a(4n + 1) = a(4n) = A239621(2n) = A300588(n), a(4n + 2) = a(4n-1) = A239621(2n-1) = A300587(n). - M. F. Hasler, Mar 09 2018

A239621 Gaussian primes x + i*y, with x = a(2n-1) >= y = a(2n) >= 0, sorted by norm.

Original entry on oeis.org

1, 1, 2, 1, 3, 0, 3, 2, 4, 1, 5, 2, 6, 1, 5, 4, 7, 0, 7, 2, 6, 5, 8, 3, 8, 5, 9, 4, 10, 1, 10, 3, 8, 7, 11, 0, 11, 4, 10, 7, 11, 6, 13, 2, 10, 9, 12, 7, 14, 1, 15, 2, 13, 8, 15, 4, 16, 1, 13, 10, 14, 9, 16, 5, 17, 2, 13, 12, 14, 11, 16, 9, 18, 5, 17, 8, 19, 0
Offset: 1

Views

Author

T. D. Noe, Mar 22 2014

Keywords

Comments

The condition a >= b >= 0 implies that there is only one Gaussian prime for each norm. - T. D. Noe, Mar 26 2014
The real parts and imaginary parts are listed as a(2n-1) = A300587(n) and a(2n) = A300588(n), respectively. Sequence A239397 lists the pair (y, x) after each pair (x, y), except for (1, 1). - M. F. Hasler, Mar 10 2018

Examples

			From _M. F. Hasler_, Mar 09 2018: (Start)
Sorted by norm, the smallest Gaussian primes z = x + iy in the first half-quadrant x >= y >= 0 are:
a(1) + i*a(2) = 1 + i;
a(3) + i*a(4) = 2 + i;
a(5) + i*a(6) = 3;
... (End)
		

Crossrefs

Cf. A055025 (norms of Gaussian primes), A239397.

Programs

  • Mathematica
    mx = 20; lst = Flatten[Table[{a, b}, {a, 0, mx}, {b, 0, a}], 1]; qq = Select[lst, Norm[#] <= mx && PrimeQ[#[[1]] + I*#[[2]], GaussianIntegers -> True] &]; Sort[qq, Norm[#1] < Norm[#2] &]
  • PARI
    {for(n=2,400, f=factor(n*I)/*factor in Z[i]*/; matsize(f)[1]<=2 && vecsum(f[,2])==2+(f[1,1]==I) /*either I*p^2 or w*conj(w/I), maybe (1+I)^2 */ && printf("%d,",vecsort([real(f=f[3-f[1,2],1]),imag(f)],,4)))} \\ For illustrative use. - M. F. Hasler, Mar 09 2018

Extensions

Name changed and in cf. complex -> Gaussian - Wolfdieter Lang, Mar 25 2014
Name edited by M. F. Hasler, Mar 09 2018

A300588 Imaginary part y of the n-th Gaussian prime x + i*y, x >= y >= 0, ordered by norm x^2 + y^2 = A055025(n)^2.

Original entry on oeis.org

1, 1, 0, 2, 1, 2, 1, 4, 0, 2, 5, 3, 5, 4, 1, 3, 7, 0, 4, 7, 6, 2, 9, 7, 1, 2, 8, 4, 1, 10, 9, 5, 2, 12, 11, 9, 5, 8, 0, 7, 10, 6, 1, 3, 14, 12, 7, 4, 10, 5, 11, 0, 10, 14, 13, 1, 8, 5, 17, 16, 4, 13, 6, 12, 1, 5, 15, 2, 9, 19, 12, 17, 11, 5, 14, 10, 18, 4, 6, 16, 20, 19, 10, 13, 0, 4, 6
Offset: 1

Views

Author

M. F. Hasler, Mar 09 2018

Keywords

Comments

With the restriction Re(z) >= Im(z) >= 0 used here and in A239621, there is exactly one Gaussian prime z for each possible norm |z|^2 in A055025. Sequence A239397 lists both, (x, y) and (y, x), for each of these having x > y (i.e., except for x = y = 1).
According to the graph, the values seem rather uniformly distributed between 0 and the upper bound sqrt(A055025(n)/2) ~ sqrt(n log n), in contrast to the values of the real parts A300587(n).

Examples

			The smallest Gaussian primes with Re(z) >= Im(z) >= 0, ordered by norm, are 1+i, 2+i, 3, 3+i, ...
Their imaginary parts, listed here, are a(1) = 1, a(2) = 1, a(3) = 0, a(4) = 1,
		

Crossrefs

Even bisection of A239621. See A300587 for real parts, A055025 for the norms.

Programs

  • PARI
    c=1; for(n=1,oo, matsize(f=factor(n*I))[1]<=2 && vecsum(f[,2])==2+(f[1, 1]==I) && !write("/tmp/b300588.txt",c" "min(real(f=f[3-f[1,2],1]),imag(f))) && c++>1e4 && break) \\ Replace write("/tmp/b300588.txt",c" by print1(" to print the values.

Formula

a(n) = A239621(2n) = A239397(4n-3) (= A239397(4n-4) for n > 1).
a(n) = sqrt(A055025(n) - A300587(n)^2).
Showing 1-3 of 3 results.