The n-th row has the numbers r such that prime(n) divides r! + 1.

1, 2, 4, 3, 6, 5, 10, 12, 16, 9, 18, 14, 18, 22, 18, 28, 30, 36, 40, 21, 42, 23, 46, 52, 15, 40, 43, 58, 8, 16, 18, 60, 18, 33, 66, 7, 9, 19, 51, 61, 63, 70, 72, 23, 39, 55, 78, 13, 36, 69, 82, 88, 96, 100, 6, 51, 102, 106, 86, 108, 112, 63, 126, 65, 130, 16, 35

1

The n-th row always ends with prime(n) - 1. Sequence A055939 contains the primes p for which (p-1)/2 is a member of row n. Sequence A115092 gives the number of terms in each row.

T. D. Noe, Plot of 2000 rows

T. D. Noe, Table of 2000 rows

(Mma) Table[cnt = 0; f = 1; t2 = {}; Do[f = Mod[f*m, p]; If[f + 1 == p, cnt++; AppendTo[t2, m]], {m, p - 1}]; t2, {p, Prime[Range[50]]}]

Cf. A055939, A115092, S000639.

nonn,tabf

T. D. Noe, Jun 22 2015