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) * (A065769(n) - Sum_{d|n, d>1, d<n} f(d) * f(n/d)) for n > 1.
PROG
(PARI)
up_to = 1+(2^16);
A003557(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 2] = max(0, f[i, 2]-1)); factorback(f); };
A065769(n) = { my(f=factor(n>>valuation(n, 2))[, 1]~); (A003557(n) * factorback(vector(#f, i, precprime(f[i]-1)))); }; \\ Antti Karttunen, Sep 03 2018
DirSqrt(v) = {my(n=#v, u=vector(n)); u[1]=1; for(n=2, n, u[n]=(v[n]/v[1] - sumdiv(n, d, if(d>1&&d<n, u[d]*u[n/d], 0)))/2); u};
v318669_aux = DirSqrt(vector(up_to, n, A065769(n)));
A318669(n) = numerator(v318669_aux[n]);
CROSSREFS
KEYWORD
nonn,frac,mult
AUTHOR
Antti Karttunen, Sep 03 2018
STATUS
approved