|
|
A082817
|
|
Triangle (with distinct entries) read by rows in which row n contains n numbers whose product == -1 (mod n).
|
|
5
|
|
|
1, 3, 5, 2, 4, 7, 9, 11, 13, 17, 6, 8, 12, 14, 16, 19, 23, 25, 29, 31, 35, 10, 15, 18, 20, 22, 24, 36, 21, 27, 33, 37, 39, 41, 43, 49, 26, 28, 32, 34, 38, 40, 44, 46, 53, 47, 51, 57, 59, 61, 63, 67, 69, 71, 81, 30, 42, 45, 48, 50, 52, 54, 56, 58, 60, 65, 55, 73, 77, 79, 83, 85
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Obviously all members of the n-th group are coprime to n.
|
|
LINKS
|
|
|
EXAMPLE
|
1
3 5
2 4 7
9 11 13 17
6 8 12 14 16
...
|
|
PROG
|
(PARI) used = vector(1000); print(1); for (n = 2, 15, rowProd = 1; x = 2; for (k = 1, n - 1, while (used[x] || gcd(x, n) > 1, x = x + 1); print1(x); print1(" "); used[x] = 1; rowProd = rowProd*x; x = x + 1); while (used[x] || rowProd*x%n != n - 1, x = x + 1); print(x); used[x] = 1);
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|