cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A257527 Prime numbers that have a triangular Voronoi cell in the Voronoi diagram of the Ulam prime spiral.

This page as a plain text file.
%I A257527 #23 Dec 16 2017 17:59:54
%S A257527 313,389,1283,1399,1669,1787,2087,2143,2713,2801,3469,4091,4787,4789,
%T A257527 4903,4933,5867,6037,6869,8111,8627,9419,9439,11701,11971,12043,13229,
%U A257527 13693,13829,14591,16139,16229,17027,17749,17791,20611,20773
%N A257527 Prime numbers that have a triangular Voronoi cell in the Voronoi diagram of the Ulam prime spiral.
%H A257527 Vardan Semerjyan, <a href="http://smallsats.org/2014/01/03/voronoi-diagram-of-prime-spiral/">Voronoi diagram of prime spiral</a>
%o A257527 (MATLAB)
%o A257527 sz  = 201; % Size of the N x N square matrix
%o A257527 mat = spiral(sz); % MATLAB Function
%o A257527 k = 1;
%o A257527 for i =1:sz
%o A257527     for j=1:sz
%o A257527         if isprime(mat(i,j)) % Check if the number is prime
%o A257527             % saving indices of primes
%o A257527             y(k) = i; x(k) = j;
%o A257527             k = k+1;
%o A257527         end
%o A257527     end
%o A257527 end
%o A257527 xy = [x',y'];
%o A257527 [v,c] = voronoin(xy); %  Returns Voronoi vertices V and
%o A257527 % the Voronoi cells C
%o A257527 k = 1;
%o A257527 for i = 1:length(c)
%o A257527   szv = size(v(c{i},1));
%o A257527   polyN(i) = szv(1);
%o A257527   if polyN(i) == 3
%o A257527         A(k) = mat(y(i),x(i));
%o A257527         k = k+1;
%o A257527       end
%o A257527 end
%o A257527 % Print terms
%o A257527 A = sort(A);
%o A257527 fprintf('A = ');
%o A257527 fprintf('%i, ',A);
%o A257527 % Note that the last terms might not be correct. They correspond to the points on the outer
%o A257527 % edges of the spiral which might be altered when considering a larger spiral.
%o A257527 % Use larger spiral to get more terms
%Y A257527 Cf. A000040, A257528, A257529.
%K A257527 nonn
%O A257527 1,1
%A A257527 _Vardan Semerjyan_, Apr 28 2015