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.

Showing 1-7 of 7 results.

A257528 Prime numbers that have a quadrilateral Voronoi cell in the Voronoi diagram of the Ulam prime spiral.

Original entry on oeis.org

23, 31, 47, 59, 71, 73, 79, 131, 139, 167, 173, 181, 229, 239, 251, 269, 277, 331, 353, 359, 367, 421, 439, 449, 467, 479, 499, 587, 617, 661, 701, 709, 739, 751, 761, 797, 887, 941, 967, 1021, 1063, 1129, 1151, 1171, 1181, 1229, 1279, 1291, 1303, 1321, 1427, 1429, 1451, 1481
Offset: 1

Views

Author

Vardan Semerjyan, Apr 28 2015

Keywords

Crossrefs

Programs

  • 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) == 4
            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 a larger spiral to get more terms.

A257529 Prime numbers that have a pentagonal Voronoi cell in the Voronoi diagram of the Ulam prime spiral.

Original entry on oeis.org

2, 3, 11, 13, 17, 19, 29, 37, 53, 83, 97, 101, 103, 107, 109, 113, 137, 149, 151, 163, 191, 197, 211, 223, 227, 241, 257, 271, 281, 293, 307, 337, 347, 373, 401, 419, 431, 433, 461, 521, 523, 541, 563, 569, 571, 577, 593, 619, 653, 659, 673
Offset: 1

Views

Author

Vardan Semerjyan, Apr 28 2015

Keywords

Crossrefs

Programs

  • 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) == 5
            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

A257745 Prime numbers that have a hexagonal Voronoi cell in the Voronoi diagram of the Ulam prime spiral.

Original entry on oeis.org

5, 7, 41, 43, 89, 127, 179, 193, 233, 263, 283, 317, 379, 383, 397, 443, 457, 487, 503, 547, 599, 607, 631, 643, 647, 719, 733, 787, 809, 821, 839, 937, 947, 971, 977, 997, 1019, 1039, 1049, 1069, 1091, 1097, 1103, 1109, 1187, 1193, 1217, 1231
Offset: 1

Views

Author

Vardan Semerjyan, May 07 2015

Keywords

Crossrefs

Programs

  • 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) == 6
            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

A257746 Prime numbers that have a heptagonal (7 sides) Voronoi cell in the Voronoi diagram of the Ulam prime spiral.

Original entry on oeis.org

61, 157, 199, 311, 349, 409, 463, 509, 557, 601, 641, 691, 727, 757, 823, 911, 919, 1051, 1093, 1123, 1153, 1213, 1327, 1433, 1459, 1627, 1951, 2027, 2063, 2221, 2251, 2293, 2311, 2357, 2389, 2551, 2621, 2683, 2719, 2789, 2791, 2939, 2953
Offset: 1

Views

Author

Vardan Semerjyan, May 07 2015

Keywords

Crossrefs

Programs

  • MATLAB
    clc
    clear all
    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) == 7
            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

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

Original entry on oeis.org

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
Offset: 1

Views

Author

Vardan Semerjyan, May 07 2015

Keywords

Crossrefs

Programs

  • 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

A257748 Prime numbers that have a decagonal (10 sides) Voronoi cell in the Voronoi diagram of the Ulam prime spiral.

Original entry on oeis.org

8741, 9533, 11087, 14629, 17077, 26029, 29723, 33247, 38723, 40177, 43991, 45677, 56369, 57709, 58027, 68749, 77479, 81727, 88117, 90173, 93053, 110933, 112297, 112901, 114859, 117773, 127219, 129841, 131771, 146161, 156719, 159293, 169369
Offset: 1

Views

Author

Vardan Semerjyan, May 07 2015

Keywords

Crossrefs

Programs

  • MATLAB
    sz  = 701; % 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) == 10
            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

A257749 Prime numbers that have a dodecagonal (12 sides) Voronoi cell in the Voronoi diagram of the Ulam prime spiral.

Original entry on oeis.org

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
Offset: 1

Views

Author

Vardan Semerjyan, May 07 2015

Keywords

Crossrefs

Programs

  • 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
Showing 1-7 of 7 results.