login
Sum of n and the Dirichlet inverse of n - A003415(n).
2

%I #9 Nov 15 2021 01:09:35

%S 2,1,1,5,1,9,1,11,10,15,1,12,1,21,24,25,1,19,1,18,34,33,1,25,26,39,31,

%T 24,1,17,1,59,54,51,60,42,1,57,64,35,1,23,1,36,43,69,1,54,50,51,84,42,

%U 1,59,96,45,94,87,1,63,1,93,59,145,114,35,1,54,114,37,1,94,1,111,75,60,138,41,1,68,97,123,1,87

%N Sum of n and the Dirichlet inverse of n - A003415(n).

%C The first negative term is a(1408) = -131.

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

%F a(n) = n + A347082(n).

%o (PARI)

%o up_to = 16384;

%o DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*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 A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));

%o v347082 = DirInverseCorrect(vector(up_to,n,n-A003415(n)));

%o A347082(n) = v347082[n];

%o A347087(n) = (n+A347082(n));

%Y Cf. A003415, A168036, A347082, A347083, A347086.

%K sign

%O 1,1

%A _Antti Karttunen_, Aug 17 2021