%I #16 Dec 16 2017 18:00:21
%S 23,31,47,59,71,73,79,131,139,167,173,181,229,239,251,269,277,331,353,
%T 359,367,421,439,449,467,479,499,587,617,661,701,709,739,751,761,797,
%U 887,941,967,1021,1063,1129,1151,1171,1181,1229,1279,1291,1303,1321,1427,1429,1451,1481
%N Prime numbers that have a quadrilateral Voronoi cell in the Voronoi diagram of the Ulam prime spiral.
%H Vardan Semerjyan, <a href="http://smallsats.org/2014/01/03/voronoi-diagram-of-prime-spiral/">Voronoi diagram of prime spiral</a>
%o (MATLAB)
%o sz = 201; % Size of the N x N square matrix
%o mat = spiral(sz); % MATLAB Function
%o k = 1;
%o for i =1:sz
%o for j=1:sz
%o if isprime(mat(i,j)) % Check if the number is prime
%o % saving indices of primes
%o y(k) = i; x(k) = j;
%o k = k+1;
%o end
%o end
%o end
%o xy = [x',y'];
%o [v,c] = voronoin(xy); % Returns Voronoi vertices V and
%o % the Voronoi cells C
%o k = 1;
%o for i = 1:length(c)
%o szv = size(v(c{i},1));
%o polyN(i) = szv(1);
%o if polyN(i) == 4
%o A(k) = mat(y(i),x(i));
%o k = k+1;
%o end
%o end
%o % Print terms
%o A = sort(A);
%o fprintf('A = ');
%o fprintf('%i, ',A);
%o % Note that the last terms might not be correct.
%o % They correspond to the points on the outer edges of the spiral which might be altered when considering a larger spiral.
%o % Use a larger spiral to get more terms.
%Y Cf. A000040, A257528, A257527.
%K nonn
%O 1,1
%A _Vardan Semerjyan_, Apr 28 2015
|