login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Sum of A287896 and its Dirichlet inverse.
2

%I #6 Feb 12 2019 22:36:50

%S 2,0,0,4,0,8,0,4,4,12,0,4,0,12,12,5,0,8,0,6,12,20,0,8,9,20,8,6,0,-8,0,

%T 6,20,20,18,12,0,28,20,12,0,8,0,10,4,28,0,10,9,10,20,10,0,16,30,12,28,

%U 28,0,20,0,20,20,7,30,-16,0,10,28,0,0,16,0,44,-2,14,30,0,0,15,16,44,0,28,30,52,28,20,0,40

%N Sum of A287896 and its Dirichlet inverse.

%H Antti Karttunen, <a href="/A323900/b323900.txt">Table of n, a(n) for n = 1..16384</a>

%F a(n) = A287896(n) + A323899(n).

%o (PARI)

%o up_to = 20000;

%o 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.

%o A001511(n) = (1+valuation(n,2));

%o A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487

%o A287896(n) = (A001511(n)*A002487(n));

%o v323899 = DirInverse(vector(up_to,n,A287896(n)));

%o A323899(n) = v323899[n];

%o A323900(n) = (A287896(n)+A323899(n));

%Y Cf. A001511, A002487, A287896, A323365, A323885, A323899.

%K sign

%O 1,1

%A _Antti Karttunen_, Feb 12 2019