OFFSET
1,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A001222(n) - Sum_{d|n, d>1, d<n} f(d) * f(n/d)) for n > 1.
PROG
(PARI)
A317938aux(n) = if(1==n, n, (bigomega(n)-sumdiv(n, d, if((d>1)&&(d<n), A317938aux(d)*A317938aux(n/d), 0)))/2);
A317938(n) = numerator(A317938aux(n));
(PARI)
\\ Memoized implementation:
memo317938 = Map();
A317938aux(n) = if(1==n, n, if(mapisdefined(memo317938, n), mapget(memo317938, n), my(v = (bigomega(n)-sumdiv(n, d, if((d>1)&&(d<n), A317938aux(d)*A317938aux(n/d), 0)))/2); mapput(memo317938, n, v); (v)));
CROSSREFS
KEYWORD
sign,frac
AUTHOR
Antti Karttunen, Aug 12 2018
STATUS
approved