OFFSET
1,3
COMMENTS
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Trace of matrix A191898.
a(n) = Sum_{k=1..n} A023900(k).
a(n) = 2 - Sum_{m=1..n} Sum_{k=1..n} A191898(m,k).
a(n) = Sum_{k=1..n} k * mu(k) * floor(n/k), where mu(k) is the Moebius function. - Daniel Suteu, Jun 11 2018
MAPLE
a_list := len -> ListTools:-PartialSums([seq(mul(1-i, i=numtheory:-factorset(k)), k=1..len)]): a_list(49); # Peter Luschny, Jul 20 2016
MATHEMATICA
Clear[a, n, d]; a[n_] := If[n < 1, 0, Sum[d MoebiusMu@d, {d, Divisors[n]}]]; Accumulate[Table[a[n], {n, 1, 49}]] (* After Michael Somos in A023900 *)
Clear[jj];
jj = 49;
Table[
Clear[nn, A, B, AB, n, k];
nn = 2*ii;
A = Table[
Table[If[Mod[n, k] == 0, Sqrt[k], 0], {k, 1, nn}], {n, 1, nn}];
B = Table[
Table[If[Mod[k, n] == 0, MoebiusMu[n]*Sqrt[n], 0], {k, 1, nn}], {n,
1, nn}]; MatrixForm[AB = A.B];
a = Table[Table[AB[[n, k]], {k, 1, nn/2}], {n, 1, nn/2}];
d = Table[Table[AB[[n, k]], {k, nn/2 + 1, nn}], {n, nn/2 + 1, nn}];
1 - Total[Total[a + d]], {ii, 1, jj}]
CROSSREFS
KEYWORD
sign
AUTHOR
Mats Granvik, Jul 19 2016
STATUS
approved