OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
FORMULA
G.f. A(x) satisfies: A(x) = x - Sum_{k>=2} rad(k) * A(x^k).
From Isaac Saffold, May 30 2020: (Start)
Proof:
As lambda(n), h(n), and rad(n) are multiplicative, the identity needs only to be proved for prime power n.
It is clear that the identity holds for n = 1 = p^0. For a given nonnegative integer k, assume the identity holds for all v such that 0 <= v <= k. Then, by the recursive formula for Dirichlet inverses,
a(p^(k+1)) = -Sum_{v=0..k} lambda(p^v)*h(p^v)*rad(p^v)*rad(p^(k+1-v))
= -p * (1 + p*Sum_{v=1..k}((-1)^v * (p-1)^(v-1)))
= -p * (1 - p*Sum_{v=0..(k-1)}((1 - p)^v))
= -p * (1 - p*(((1-p)^k - 1) / -p))
= -p * (1-p)^k
= (-1)^(k+1) * (p-1)^k * p
= lambda(p^(k+1)) * h(p^(k+1)) * rad(p^(k+1))
Thus the identity holds for p^(k+1), k >= 0.
As k is arbitrary and the identity holds for p^0, it holds for the prime powers, and thus for all positive integers. Q.E.D. (End)
MATHEMATICA
a[n_] := If[n == 1, n, -Sum[If[d < n, Last[Select[Divisors[n/d], SquareFreeQ]] a[d], 0], {d, Divisors[n]}]]; Table[a[n], {n, 1, 60}]
f[p_, e_] := -p*(1 - p)^(e - 1); a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Oct 14 2020 *)
PROG
(PARI) rad(n) = factorback(factorint(n)[, 1]); \\ A007947
lista(nn) = {my(va=vector(nn)); va[1] = 1; for (n=2, nn, va[n] = -sumdiv(n, d, if (d<n, rad(n/d) * va[d])); ); va; } \\ Michel Marcus, Jun 01 2020
CROSSREFS
KEYWORD
sign,mult,easy
AUTHOR
Ilya Gutkovskiy, Sep 04 2019
STATUS
approved