login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Prime numbers that have an octagonal (8 sides) Voronoi cell in the Voronoi diagram of the Ulam prime spiral.
0

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

%S 67,491,613,1013,1117,1201,1249,1301,1373,1543,1753,1907,2017,2339,

%T 2411,2657,2671,2879,3023,3037,3181,3677,3727,3733,4139,4409,4549,

%U 4861,5303,5381,5399,5857,5897,6301,6373,6737,7433,7499,7577,7583

%N Prime numbers that have an octagonal (8 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 = 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) == 8

%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