OFFSET
1,2
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.
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..5050
EXAMPLE
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.
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 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Jun 24 2011
STATUS
approved