login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A349789
a(1) = 1; a(n) = -Sum_{d|n, d < n} gpf(n/d) * a(d).
2
1, -2, -3, 2, -5, 9, -7, -2, 6, 15, -11, -15, -13, 21, 25, 2, -17, -27, -19, -25, 35, 33, -23, 21, 20, 39, -12, -35, -29, -105, -31, -2, 55, 51, 63, 66, -37, 57, 65, 35, -41, -147, -43, -55, -80, 69, -47, -27, 42, -85, 85, -65, -53, 72, 99, 49, 95, 87, -59, 245
OFFSET
1,2
COMMENTS
Dirichlet inverse of A006530.
LINKS
Eric Weisstein's World of Mathematics, Greatest Prime Factor
FORMULA
From Bernard Schott, Dec 05 2021: (Start)
a(n) = -n iff n is prime.
a(2^k) = (-1)^k * 2 for k > 0. (End)
MATHEMATICA
a[1] = 1; a[n_] := a[n] = -Sum[(FactorInteger[n/d][[-1, 1]]) a[d], {d, Most @ Divisors[n]}]; Table[a[n], {n, 1, 60}]
PROG
(PARI)
A006530(n) = if(1==n, n, my(f=factor(n)); f[#f~, 1]);
memoA349789 = Map();
A349789(n) = if(1==n, 1, my(v); if(mapisdefined(memoA349789, n, &v), v, v = -sumdiv(n, d, if(d<n, A006530(n/d)*A349789(d), 0)); mapput(memoA349789, n, v); (v))); \\ Antti Karttunen, Dec 05 2021
CROSSREFS
Sequence in context: A110642 A079535 A367859 * A337354 A293944 A050159
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Nov 30 2021
STATUS
approved