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.

A192175 Array of primes determined by distance to next prime, by antidiagonals.

Original entry on oeis.org

2, 3, 7, 5, 13, 23, 11, 19, 31, 89, 17, 37, 47, 359, 139, 29, 43, 53, 389, 181, 199, 41, 67, 61, 401, 241, 211, 113, 59, 79, 73, 449, 283, 467, 293, 1831, 71, 97, 83, 479, 337, 509, 317, 1933, 523, 101, 103, 131, 491, 409, 619, 773, 2113, 1069, 887, 107
Offset: 1

Views

Author

Clark Kimberling, Jun 24 2011

Keywords

Comments

Row 1: primes p such that p+1 or p+2 is a prime.
Row r>1: primes p such that the least h for which p+2h is prime is r.

Examples

			Northwest corner:
  2.....3.....5.....11....17....29....41
  7.....13....19....37....43....67....79
  23....31....47....53....61....73....83
  89....359...389...401...449...479...491
  139...181...241...283...337...409...421
For example, 31 is in row 3 because 31+2*3 is a prime, unlike 31+2*1 and 31+2*2.  Every prime occurs exactly once.  For each row, it is not known whether it is finite.
		

Crossrefs

Programs

  • Mathematica
    z = 5000; (* z=number of primes used *)
    row[1] = (#1[[1]] &) /@ Cases[Array[{#1,
          PrimeQ[1 + Prime[#1]] || PrimeQ[2 + Prime[#1]]} &, {z}], {_, True}];
    Do[row[x] = Complement[(#1[[1]] &) /@ Cases[Array[{#1, PrimeQ[2 x + Prime[#1]]} &, {z}], {_, True}], Flatten[Array[row, {x - 1}]]], {x, 2, 16}]; TableForm[Array[Prime[row[#]] &, {10}]] (* A192175 array *)
    Flatten[Table[ Prime[row[k][[n - k + 1]]], {n, 1, 11}, {k, 1, n}]] (* A192175 sequence *)
    (* Peter J. C. Moses, Jun 20 2011 *)