OFFSET
1,12
COMMENTS
Omega(n) = A001222(n) is the number of prime factors of n counted with multiplicity.
First occurrence of k: 1, 12, 48, 60, 36, 3072, 72, 420, 240, 786432, 3145728, 144, 216, ..., . - Robert G. Wilson v, Jul 22 2018
Records: 1, 2, 5, 7, 12, 13, 15, 18, 26, 37, 38, 57, 60, 67, 81, 96, 142, 165, 199, 221, 234, ..., . - Robert G. Wilson v, Jul 22 2018
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
a(1) = 1 and a(n > 1) = -Sum_{d|n, d not a perfect power} (-1)^Omega(d) * a(n/d).
MATHEMATICA
a[n_]:=a[n]=If[n==1, 1, -Sum[(-1)^PrimeOmega[d]*a[n/d], {d, Select[Rest[Divisors[n]], GCD@@FactorInteger[#][[All, 2]]==1&]}]];
Array[a, 100]
PROG
(PARI) A304779(n) = if(1==n, 1, -sumdiv(n, d, if((d>1)&&!ispower(d), ((-1)^bigomega(d))*A304779(n/d), 0))); \\ Antti Karttunen, Jul 22 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 18 2018
EXTENSIONS
More terms from Antti Karttunen, Jul 22 2018
STATUS
approved