OFFSET
1,4
COMMENTS
Row n has length A000010(n).
Row n > 1 has sum = n*A076512(n)/2.
First value on row(n) = A076511(n).
Last value on row(n) = A076512(n) for n > 1.
For n > 1, A109395(n) = Max(row) + Min(row).
For values x and y on row n > 1 at positions a and b on the row:
For n > 2 the penultimate value on row A002110(n) is given by
From Charlie Neder, Jun 05 2019: (Start)
If p is a prime dividing n, then row p*n consists of p copies of row n.
Conjecture: If n is odd, then row 2n can be obtained from row n by interchanging the first and second halves. (End)
LINKS
Jamie Morken, Table of n, a(n) for n = 1..13413 (Rows n = 1..210 of triangle, flattened)
EXAMPLE
The sequence as an irregular triangle:
n/k 1, 2, 3, 4, ...
1: 0
2: 1
3: 1, 2
4: 1, 1
5: 1, 2, 3, 4
6: 2, 1
7: 1, 2, 3, 4, 5, 6
8: 1, 1, 1, 1
9: 1, 2, 1, 2, 1, 2
10: 3, 4, 1, 2
11: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
12: 2, 1, 2, 1
13: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
14: 4, 5, 6, 1, 2, 3
15: 7, 14, 13, 4, 11, 2, 1, 8
...
Row sums: 0, 1, 3, 2, 10, 3, 21, 4, 9, 10, 55, 6, 78, 21, 60.
MATHEMATICA
Flatten@ Table[With[{a = n/GCD[n, #], b = Numerator[#/n]}, MapIndexed[a First@ #2 - b #1 &, Flatten@ Position[GCD[Table[Mod[k, n], {k, n - 1}], n], 1] /. {} -> {1}]] &@ EulerPhi@ n, {n, 15}] (* Michael De Vlieger, Jun 06 2019 *)
PROG
(PARI) vtot(n) = select(x->(gcd(n, x)==1), vector(n, k, k));
row(n) = my(q = eulerphi(n)/n, v = vtot(n)); vector(#v, k, denominator(q)*k - numerator(q)*v[k]); \\ Michel Marcus, May 14 2019
CROSSREFS
KEYWORD
sign,tabf
AUTHOR
Jamie Morken, May 13 2019
STATUS
approved