Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Prime numbers that have a pentagonal Voronoi cell in the Voronoi diagram of the Ulam prime spiral.
1

%I #18 Dec 16 2017 18:00:58

%S 2,3,11,13,17,19,29,37,53,83,97,101,103,107,109,113,137,149,151,163,

%T 191,197,211,223,227,241,257,271,281,293,307,337,347,373,401,419,431,

%U 433,461,521,523,541,563,569,571,577,593,619,653,659,673

%N Prime numbers that have a pentagonal 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) == 5

%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 larger spiral to get more terms

%Y Cf. A257527, A257528, A000040, A077800.

%K nonn

%O 1,1

%A _Vardan Semerjyan_, Apr 28 2015