login
A317939
Numerators of sequence whose Dirichlet convolution with itself yields A080339 = A010051 (characteristic function of primes) + A063524 (1, 0, 0, 0, ...).
4
1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 3, 1, -1, -1, -5, 1, 3, 1, 3, -1, -1, 1, -5, -1, -1, 1, 3, 1, 3, 1, 7, -1, -1, -1, -15, 1, -1, -1, -5, 1, 3, 1, 3, 3, -1, 1, 35, -1, 3, -1, 3, 1, -5, -1, -5, -1, -1, 1, -15, 1, -1, 3, -21, -1, 3, 1, 3, -1, 3, 1, 35, 1, -1, 3, 3, -1, 3, 1, 35, -5, -1, 1, -15, -1, -1, -1, -5, 1, -15, -1, 3, -1, -1, -1, -63, 1, 3, 3
OFFSET
1,12
LINKS
FORMULA
a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A010051(n) - Sum_{d|n, d>1, d<n} f(d) * f(n/d)) for n > 1.
PROG
(PARI)
up_to = 65537;
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}; \\ From A317937.
v317939aux = DirSqrt(vector(up_to, n, if(1==n, 1, isprime(n))));
A317939(n) = numerator(v317939aux[n]);
CROSSREFS
Cf. A010051, A080339, A046644 (denominators).
Sequence in context: A357990 A346485 A340084 * A086767 A119288 A226040
KEYWORD
sign,frac
AUTHOR
Antti Karttunen, Aug 14 2018
STATUS
approved