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