login
Prime numbers that have a decagonal (10 sides) Voronoi cell in the Voronoi diagram of the Ulam prime spiral.
0

%I #9 Dec 16 2017 18:02:59

%S 8741,9533,11087,14629,17077,26029,29723,33247,38723,40177,43991,

%T 45677,56369,57709,58027,68749,77479,81727,88117,90173,93053,110933,

%U 112297,112901,114859,117773,127219,129841,131771,146161,156719,159293,169369

%N Prime numbers that have a decagonal (10 sides) 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 = 701; % 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) == 10

%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 % When running the code be aware that the last terms you get might not be correct.

%o % They correspond to the points on the outer edges of the spiral which might be

%o % altered when considering a larger spiral.

%o % Use larger spiral to get more terms

%Y Cf. A257527, A257528, A000040.

%K nonn

%O 1,1

%A _Vardan Semerjyan_, May 07 2015