login
A127332
1
1, 2, 2, 3, 3, 3, 5, 4, 4, 5, 9, 1, 10, 8, 3, 7, 15, 3, 16, 2, 6, 17, 21, -6, 13, 19, 11, 8, 27, -5, 27, 10, 13, 28, 10, -10, 35, 31, 17, -6, 40, -3, 40, 20, -4, 40, 44, -18, 32, 18, 26, 23, 50, 4, 21, 0, 28, 54, 58, -45, 59, 53, 3, 19, 24, 11, 65, 37, 39, 1
OFFSET
1,2
LINKS
FORMULA
M * V where M = A126988 as an infinite lower triangular matrix and V = the Mertens sequence, A002321 as a vector: [1, 0, -1, -1, -2, -1, ...].
a(n) = Sum_{q=1..n} c_q(n), where c_q(n) is the Ramanujan's sum function given in A054533. - Daniel Suteu, Jun 14 2018
EXAMPLE
a(6) = 3 = 6*1 + 3*0 + 2*(-1) + 0*(-1) + 0*(-2) + 1*(-1), where (6, 3, 2, 0, 0, 1) = row 6 of A126988.
MATHEMATICA
Block[{nn = 70, m}, m = Table[Sum[MoebiusMu@k, {k, n}], {n, nn}]; Table[Total@ Array[m[[#]] If[Mod[n, #] == 0, n/#, 0] &, n], {n, nn}]] (* Michael De Vlieger, Jun 14 2018 *)
PROG
(PARI) lista(nn) = {mat = matrix(nn, nn, n, k, if (n % k, 0, n/k)); vec = matrix(nn, 1, n, k, if (k==1, mertens(n), 0)); res = (mat*vec); for (n = 1, nn, print1(res[n, 1], ", "); ); } \\ Michel Marcus, Sep 25 2013
(PARI) a(n) = sum(k=1, n, moebius(k / gcd(n, k)) * eulerphi(k) / eulerphi(k / gcd(n, k))); \\ Daniel Suteu, Jun 23 2018
CROSSREFS
KEYWORD
sign
AUTHOR
Gary W. Adamson, Jan 10 2007
EXTENSIONS
Corrected and extended by Michel Marcus, Sep 25 2013
STATUS
approved