|
|
A257749
|
|
Prime numbers that have a dodecagonal (12 sides) Voronoi cell in the Voronoi diagram of the Ulam prime spiral.
|
|
0
|
|
|
61673, 635939, 706117, 720743, 1483439, 1742501, 1766701, 1847603, 2097959, 2163461, 2365289, 2429411, 3420101, 3490703, 3657361, 3920843, 3973829, 4758973, 4920887, 4989779, 5273753, 6167687, 6223247, 6573559, 6655409, 6694333, 6791881, 7095503, 7102349, 7338293, 7644541
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
PROG
|
(MATLAB)
sz = 3001; % 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) == 12
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
|
|
|
|