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.
%I A239397 #36 Feb 16 2025 08:33:21 %S A239397 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, %T A239397 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, %U A239397 11,0,0,11,11,4,4,11,10,7,7,10,11,6,6,11,13,2 %N A239397 Prime Gaussian integers x + y*i sorted by norm and increasing y, with x and y nonnegative. %C A239397 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 %C A239397 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 %H A239397 T. D. Noe, <a href="/A239397/b239397.txt">Table of n, a(n) for n = 1..10002</a> (5001 complex numbers) %H A239397 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/GaussianPrime.html">Gaussian prime</a> %H A239397 Wikipedia, <a href="http://en.wikipedia.org/wiki/Complex_number">Complex Number</a> %F A239397 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 %e A239397 The sequence of Gaussian primes (with nonnegative real and imaginary part) begins 1+i, 2+i, 1+2i, 3, 3i,... %t A239397 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] &] %o A239397 (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 %o A239397 (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 %Y A239397 Cf. A055025 (norms of Gaussian primes), A239621, A300587, A300588. %K A239397 nonn,easy %O A239397 1,3 %A A239397 _T. D. Noe_, Mar 22 2014