login
A118230
Column 3 of triangle A118229, starting with row 1 to include leading zeros.
1
0, 0, 1, -1, 0, 0, -1, 2, 0, -1, 1, -1, -2, 1, 1, 0, 2, -2, -1, 0, 0, 1, 1, -1, -4, 2, 1, 1, 0, 0, 1, 0, 2, -6, 3, 0, -6, 7, 1, -2, 8, -8, -5, -5, -2, 12, 3, -7, -6, -9, 1, 18, 6, -21, -9, -5, 4, 25, -1, 1, 2, -39, -1, 35, 0, 3, 3, -18, -22, 37, 5, -5, 8, -48, 9, 45, -10, -4, 5, -55, 10, 40, -17, -35, 4, -2, -11, 61, 4, -13
OFFSET
1,8
FORMULA
Sum_{k=1..n, gcd(n,k)=1} a(k) = 1 when n=4, 0 elsewhere.
MATHEMATICA
M[n_] := M[n] = Inverse[Table[If[r >= c, If[GCD[r-c+1, c] == 1, 1, 0], 0], {r, 1, n}, {c, 1, n}]];
T[n_, k_] := If[n<k || k<0, 0, M[n][[n, k]]];
a[n_] := T[n, 3];
Array[a, 90] (* Jean-François Alcover, Oct 27 2018, from PARI *)
PROG
(PARI) {a(n)=(matrix(n+2, n+2, r, c, if(r>=c, if(gcd(r-c+1, c)==1, 1, 0)))^-1)[n, 3]}
CROSSREFS
Cf. A118229.
Sequence in context: A030341 A258832 A121444 * A179181 A153246 A358006
KEYWORD
sign
AUTHOR
STATUS
approved