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

A359298 Array T(n, k) read by antidiagonals: for n >= 0 and k >= 0, row n lists the positive integers m such that m - k is prime or 1, and m - h, for 0 <= h < k, is not prime.

Original entry on oeis.org

1, 2, 4, 3, 6, 9, 5, 8, 15, 10, 7, 12, 21, 16, 27, 11, 14, 25, 22, 35, 28, 13, 18, 33, 26, 51, 36, 95, 17, 20, 39, 34, 57, 52, 119, 96, 19, 24, 45, 40, 65, 58, 145, 120, 121, 23, 30, 49, 46, 77, 66, 187, 146, 147, 122, 29, 32, 55, 50, 87, 78, 205, 188, 189
Offset: 1

Views

Author

Clark Kimberling, Jan 01 2023

Keywords

Comments

Essentially, for n >= 0, row n lists the numbers whose distance down to the nearest prime is n.

Examples

			Corner:
   1     2     3     5     7    11    13    17     19     23     29
   4     6     8    12    14    18    20    24     30     32     38
   9    15    21    25    33    39    45    49     55     63     69
  10    16    22    26    34    40    46    50     56     64     70
  27    35    51    57    65    77    87    93    117    135    143
  28    36    52    58    66    78    88    94    118    136    144
Row 0 includes 19 because 19 is prime, and 19 - 19 = 0.
Row 1 includes 8 because the nearest prime down from 8 is 7, and 8 - 7 = 1.
		

Crossrefs

Programs

  • Mathematica
    rows = 15;
    row[0] = Join[{1}, Map[Prime, Range[250]]];
    Table[row[z] = Map[#[[1]] &, Select[Map[{#, Apply[And,
    Join[{MemberQ[row[0], # - z]}, Table[! MemberQ[row[0], # - k], {k, 0, z - 1}]]]} &, Range[Max[row[z - 1]]]], #[[2]] &]], {z, rows}];
    Table[row[z], {z, 0, rows}] // ColumnForm  (* A359298 array *)
    t[n_, k_] := row[n - 1][[k]];
    u = Table[t[n - k + 1, k], {n, 15}, {k, n, 1, -1}] //
    Flatten  (* A359298 sequence *)
    (* Peter J. C. Moses Dec 18 2022 *)

A359299 Array T(n, k) read by antidiagonals: for n >= 0 and k >= 0, row n lists the positive integers m such that m + k is prime or 1, and m + h, for 0 <= h < k, is not prime.

Original entry on oeis.org

1, 2, 4, 3, 6, 9, 5, 10, 15, 8, 7, 12, 21, 14, 25, 11, 16, 27, 20, 33, 24, 13, 18, 35, 26, 49, 32, 91, 17, 22, 39, 34, 55, 48, 121, 90, 19, 28, 45, 38, 63, 54, 143, 120, 119, 23, 30, 51, 44, 75, 62, 185, 142, 141, 118, 29, 36, 57, 50, 85, 74, 205, 184, 183
Offset: 1

Views

Author

Clark Kimberling, Jan 01 2023

Keywords

Comments

Essentially, for n >= 0, row n lists the numbers whose distance down to the nearest prime is n.

Examples

			Corner:
    1     2      3     5     7    11    13    17    19      23     29
    4     6     10    12    16    18    22    28    30      36     40
    9    15     21    27    35    39    45    51    57      65     69
    8    14     20    26    34    38    44    50    56      64     68
   25    33     49    55    63    75    85    93    123    133    145
   24    32     48    54    62    74    84    92    122    132    144
Row 0 includes 19 because 19 is prime, and 19 - 19 = 0.
Row 1 includes 10 because the nearest prime up from 10 is 11, and 11 - 10 = 1.
		

Crossrefs

Programs

  • Mathematica
    rows = 15;
    row[0] = Join[{1}, Map[Prime, Range[250]]]; Table[
    row[z] = Map[#[[1]] &, Select[Map[{#, Apply[And,
    Join[{MemberQ[row[0], # + z]}, Table[! MemberQ[row[0], # + k],
     {k, 0, z - 1}]]]} &,
    Range[Max[row[z - 1]]]], #[[2]] &]], {z, rows}];
    Table[row[z], {z, 0, rows}] // ColumnForm   (* A359299 array *)
    t[n_, k_] := row[n - 1][[k]]
    u = Table[t[n - k + 1, k], {n, 15}, {k, n, 1, -1}] //
    Flatten  (* A359299 sequence *)
    (* Peter J. C. Moses Dec 18 2022 *)
Showing 1-2 of 2 results.