login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257527 Prime numbers that have a triangular Voronoi cell in the Voronoi diagram of the Ulam prime spiral. 7
313, 389, 1283, 1399, 1669, 1787, 2087, 2143, 2713, 2801, 3469, 4091, 4787, 4789, 4903, 4933, 5867, 6037, 6869, 8111, 8627, 9419, 9439, 11701, 11971, 12043, 13229, 13693, 13829, 14591, 16139, 16229, 17027, 17749, 17791, 20611, 20773 (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) == 3
A(k) = mat(y(i), x(i));
k = k+1;
end
end
% Print terms
A = sort(A);
fprintf('A = ');
fprintf('%i, ', A);
% Note that the last terms 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
Sequence in context: A088282 A068687 A093808 * A142745 A328056 A142951
KEYWORD
nonn
AUTHOR
Vardan Semerjyan, Apr 28 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 15 22:11 EDT 2024. Contains 375959 sequences. (Running on oeis4.)