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 A222594 #4 Feb 27 2013 16:21:01 %S A222594 4,28,28,4,12,28,28,12,4,12,4,28,12,4,12,100,4,100,12,12,28,28,12,28, %T A222594 28,4,260,12,12,100,12,12,100,100,4,12,4,12,260,4,4,12,260,100,12,260, %U A222594 260,4,4,260,260,260,100,12,100,28,260,4,12,100,12,12,260 %N A222594 Length of the Gaussian prime spiral beginning at the n-th first-quadrant Gaussian prime (A222593). %C A222594 This is the idea of A222298 extended to first-quadrant Gaussian primes (A222593). It appears that all multiples of 4 eventually appear as a length. %D A222594 Joseph O'Rourke and Stan Wagon, Gaussian prime spirals, Mathematics Magazine, vol. 86, no. 1 (2013), p. 14. %H A222594 T. D. Noe, <a href="/A222594/b222594.txt">Table of n, a(n) for n = 1..2829</a> %e A222594 The smallest such prime is 1 + i. The spiral is {1 + i, 2 + i, 2 - i, 1 - i, 1 + i}, which consists of only Gaussian primes. %t A222594 loop[n_] := Module[{p = n, direction = 1}, lst = {n}; While[While[p = p + direction; ! PrimeQ[p, GaussianIntegers -> True]]; direction = direction*(-I); AppendTo[lst, p]; ! (p == n && direction == 1)]; Length[lst]]; nn = 20; ps = {}; Do[If[PrimeQ[i + (j - i) I, GaussianIntegers -> True], AppendTo[ps, i + (j-i)*I]], {j, 0, nn}, {i, 0, j}]; Table[loop[ps[[n]]] - 1, {n, Length[ps]}] %Y A222594 Cf. A222298 (spiral lengths beginning at the n-th positive real Gaussian prime). %K A222594 nonn %O A222594 1,1 %A A222594 _T. D. Noe_, Feb 27 2013