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-4 of 4 results.

A192179 Array determined by distance to next prime, by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 6, 9, 14, 7, 10, 11, 20, 13, 24, 12, 15, 26, 19, 32, 23, 16, 17, 34, 25, 48, 31, 90, 18, 21, 38, 33, 54, 47, 120, 89, 22, 27, 44, 37, 62, 53, 142, 119, 118, 28, 29, 50, 43, 74, 61, 184, 141, 140, 117, 30, 35, 56, 49, 84, 73, 204, 183, 182, 139, 116
Offset: 1

Views

Author

Clark Kimberling, Jun 24 2011

Keywords

Comments

Row r : numbers k such that r = (least positive integer h for which k + h is a prime).
Every positive integer occurs exactly once, so that as a sequence, A192179 is a permutation of the positive integers.
For r>1, the numbers in row r have the parity of r-1; e.g., the numbers in row 2 are odd.

Examples

			Northwest corner:
1....2....4....6....10....12
3....5....9....11...15....17
8....14...20...26...34....38
7....13...19...25...33....37
24...32...48...54...62....74
...
For example, 14 is in row 3 because 14 + 3 is a prime, unlike 14 + 1 and 14 + 2.
		

Crossrefs

Programs

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

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 *)

A192177 Array determined by distance down to nearest prime.

Original entry on oeis.org

1, 2, 5, 3, 7, 10, 4, 9, 16, 11, 6, 13, 22, 17, 28, 8, 15, 26, 23, 36, 29, 12, 19, 34, 27, 52, 37, 96, 14, 21, 40, 35, 58, 53, 120, 97, 18, 25, 46, 41, 66, 59, 146, 121, 122, 20, 31, 50, 47, 78, 67, 188, 147, 148, 123, 24, 33, 56, 51, 88, 79, 206, 189, 190, 149, 11
Offset: 1

Views

Author

Clark Kimberling, Jun 24 2011

Keywords

Comments

Row 1: numbers k such that k = 1 or k = 2 or k - 1 is a prime.
Row r > 1: numbers k such that k - r is a prime and k - q is not, for q = 1, 2, ..., r - 1.
Every positive integer occurs exactly once, so that as a sequence, A192177 is a permutation of the positive integers.
For r>1, the numbers in row r have the parity of r-1; e.g., the numbers in row 2 are odd.

Examples

			Northwest corner:
1....2....3....4....6....8
5....7....9....13...15...19
10...16...22...26...34...40
11...17...23...27...35...41
28...36...52...58...66...78
...
For example, 16 is in row 3 because 16 - 3 is prime, unlike 16 - 1 and 16 - 2.
		

Crossrefs

Programs

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

A192178 Array by distance to nearest prime, by antidiagonals.

Original entry on oeis.org

1, 2, 5, 3, 7, 26, 4, 9, 34, 23, 6, 11, 50, 37, 118, 8, 13, 56, 47, 122, 53, 10, 15, 64, 67, 144, 89, 120, 12, 17, 76, 79, 186, 119, 300, 409, 14, 19, 86, 83, 204, 121, 324, 479, 532, 16, 21, 92, 93, 206, 157, 530, 531, 896, 293, 18, 25, 94, 97, 216, 173, 534, 533, 898, 631, 11
Offset: 1

Views

Author

Clark Kimberling, Jun 24 2011

Keywords

Comments

Row 1: numbers k such that k = 1 or k = 2 or (k - 1 or k + 1) is a prime.
Row r > 1: numbers k such that k + r or k - r is a prime but k + q and k - q are not, for q = 1, 2, ..., r - 1.
Every positive integer occurs exactly once, so that as a sequence, A192178 is a permutation of the positive integers.
For r > 1, the numbers in row r have the parity of r - 1; e.g., the numbers in row 2 are odd.

Examples

			Northwest corner:
1....2....3....4....6....8....10
5....7....9....11...13...15...17
26...34...50...56...64...76...86
23...37...47...67...79...83...93
118..122..144..186..204..206..216
...
For example, 34 is in row 3 recause its distance to the nearest prime is 3.
		

Crossrefs

Programs

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