|
|
A257747
|
|
Prime numbers that have an octagonal (8 sides) Voronoi cell in the Voronoi diagram of the Ulam prime spiral.
|
|
0
|
|
|
67, 491, 613, 1013, 1117, 1201, 1249, 1301, 1373, 1543, 1753, 1907, 2017, 2339, 2411, 2657, 2671, 2879, 3023, 3037, 3181, 3677, 3727, 3733, 4139, 4409, 4549, 4861, 5303, 5381, 5399, 5857, 5897, 6301, 6373, 6737, 7433, 7499, 7577, 7583
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
PROG
|
(MATLAB)
sz = 201; % Size of the N x N square matrix
mat = spiral(sz); % MATLAB Function
k = 1;
for i =1:sz
for j=1:sz
if isprime(mat(i, j)) % Check if the number is prime
% saving indices of primes
y(k) = i; x(k) = j;
k = k+1;
end
end
end
xy = [x', y'];
[v, c] = voronoin(xy); % Returns Voronoi vertices V and
% the Voronoi cells C
k = 1;
for i = 1:length(c)
szv = size(v(c{i}, 1));
polyN(i) = szv(1);
if polyN(i) == 8
A(k) = mat(y(i), x(i));
k = k+1;
end
end
% Print terms
A = sort(A);
fprintf('A = ');
fprintf('%i, ', A);
% When running the code be aware that the last terms you get might not be correct.
% They correspond to the points on the outer edges of the spiral which might be
% altered when considering a larger spiral.
% Use larger spiral to get more terms
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|