OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
PROG
(PARI)
up_to = 20000;
DirInverse(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = -sumdiv(n, d, if(d<n, v[n/d]*u[d], 0))); (u) }; \\ Compute the Dirichlet inverse of the sequence given in input vector v.
A001511(n) = (1+valuation(n, 2));
A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
v323899 = DirInverse(vector(up_to, n, A287896(n)));
A323899(n) = v323899[n];
CROSSREFS
KEYWORD
sign
AUTHOR
Antti Karttunen, Feb 12 2019
STATUS
approved