login
Difference between n' and n, where n' is the arithmetic derivative of n (A003415).
22

%I #24 Dec 08 2023 12:29:06

%S 0,-1,-1,-2,0,-4,-1,-6,4,-3,-3,-10,4,-12,-5,-7,16,-16,3,-18,4,-11,-9,

%T -22,20,-15,-11,0,4,-28,1,-30,48,-19,-15,-23,24,-36,-17,-23,28,-40,-1,

%U -42,4,-6,-21,-46,64,-35,-5,-31,4,-52,27,-39,36,-35,-27,-58,32,-60,-29

%N Difference between n' and n, where n' is the arithmetic derivative of n (A003415).

%C Let k = n'-n. For k = -1 n is a primary pseudoperfect number (A054377), apart from n=1; For k=0 n is p^p, being p a prime number (A051674); For k = 1 n is a Giuga number (A007850).

%H T. D. Noe, <a href="/A168036/b168036.txt">Table of n, a(n) for n = 0..10000</a>

%F a(A083347(n)) < 0; a(A051674(n)) = 0; a(A083348(n)) > 0. - _Reinhard Zumkeller_, May 22 2015

%F Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = -1 + Sum_{p prime} 1/(p*(p-1)) = A136141 - 1 = -0.226843... . - _Amiram Eldar_, Dec 08 2023

%p with(numtheory);

%p A168036:=proc(q)

%p local n,p;

%p for n from 0 to q do

%p print(n*add(op(2,p)/op(1,p),p=ifactors(n)[2])-n); od; end:

%p A168036(1000); # _Paolo P. Lava_, Nov 05 2012

%t np[k_] := Module[{f, n, m, p}, If[k < 2, np[k] = 0; Return[0], If[PrimeQ[k], np[k] = 1; Return[1], f = FactorInteger[k, 2]; m = f[[1, 1]]; n = k/m; p = m np[n] + n np[m]; np[k] = p; Return[p]]]];

%t Table[np[n] - n, {n, 0, 100}] (* _Robert Price_, Mar 14 2020 *)

%o (Haskell)

%o a168036 n = a003415 n - n -- _Reinhard Zumkeller_, May 22 2015

%Y Cf. A007850, A051674, A054377, A136141.

%Y Cf. A003415, A051674, A083347, A083348.

%K easy,sign

%O 0,4

%A _Paolo P. Lava_, Nov 17 2009