OFFSET
1,4
COMMENTS
The first negative term is a(840) = -445.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
FORMULA
a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A078898(n) - Sum_{d|n, d>1, d<n} f(d) * f(n/d)) for n > 1.
MATHEMATICA
lpf[n_] := If[n == 1, 1, FactorInteger[n][[1, 1]]];
b[_] = 1;
f[n_] := f[n] = If[n == 1, 1, (1/2)(A078898[n] - Sum[If[1 < d < n, f[d]*f[n/d], 0], {d, Divisors[n]}])]
a[n_] := Numerator[f[n]];
Array[a, 100] (* Jean-François Alcover, Dec 19 2021 *)
PROG
(PARI)
up_to = 16384;
ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om, invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om, invec[i], (1+pt))); outvec; };
v078898 = ordinal_transform(vector(up_to, n, A020639(n)));
A078898(n) = v078898[n];
A317833aux(n) = if(1==n, n, (A078898(n)-sumdiv(n, d, if((d>1)&&(d<n), A317833aux(d)*A317833aux(n/d), 0)))/2);
A317833(n) = numerator(A317833aux(n));
CROSSREFS
KEYWORD
sign,frac
AUTHOR
Antti Karttunen, Aug 10 2018
STATUS
approved