login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A192176
Index array for A192175 (distance up to next prime), by antidiagonals.
5
1, 2, 4, 3, 6, 9, 5, 8, 11, 24, 7, 12, 15, 72, 34, 10, 14, 16, 77, 42, 46, 13, 19, 18, 79, 53, 47, 30, 17, 22, 21, 87, 61, 91, 62, 282, 20, 25, 23, 92, 68, 97, 66, 295, 99, 26, 27, 32, 94, 80, 114, 137, 319, 180, 154, 28, 29, 36, 124, 82, 121, 146, 331, 205, 259, 189
OFFSET
1,2
COMMENTS
Row 1: numbers k such that p + 1 or p + 2 is a prime,
where p = (k-th prime).
Row r > 1: numbers k such that if p = (k-th prime) then r = (least h for which p + 2 h) is a prime.
Every positive integer occurs exactly once, so that as a sequence, A192176 is a permutation of the positive integers.
EXAMPLE
Northwest corner:
1....2....3....5....7....10....13
4....6....8....12...14...19....22
9....11...15...16...18...21....23
24...72...77...79...87...92....94
34...42...53...61...68...80....82
...
These are the index numbers of the primes displayed in the Example at A192175; e.g., in that display, the top row begins with 2,3,5,11,17,29,41.
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[row, {16}]] (* A192176 array *)
Flatten[Table[row[k][[n - k + 1]], {n, 1, 11}, {k, 1, n}]] (* A192176 sequence *)
(* by Peter J. C. Moses, Jun 20 2011 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Jun 24 2011
STATUS
approved