login
a(n) = 2*tau(n) - n, where tau(n) is the number of divisors of n (A000005).
2

%I #15 Feb 17 2024 14:51:56

%S 1,2,1,2,-1,2,-3,0,-3,-2,-7,0,-9,-6,-7,-6,-13,-6,-15,-8,-13,-14,-19,

%T -8,-19,-18,-19,-16,-25,-14,-27,-20,-25,-26,-27,-18,-33,-30,-31,-24,

%U -37,-26,-39,-32,-33,-38,-43,-28,-43,-38,-43,-40,-49,-38,-47,-40,-49,-50,-55,-36

%N a(n) = 2*tau(n) - n, where tau(n) is the number of divisors of n (A000005).

%H Andrew Howroyd, <a href="/A134156/b134156.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A000005(n) - A049820(n).

%F a(n) = n - 2*A049820(n). - _Wesley Ivan Hurt_, Feb 17 2024

%o (PARI) a(n) = {2*numdiv(n) - n} \\ _Andrew Howroyd_, Feb 02 2020

%Y Cf. A000005 (tau), A049820.

%K sign,easy

%O 1,2

%A _Paul Curtz_, Jan 12 2008

%E Offset corrected and terms a(21) and beyond from _Andrew Howroyd_, Feb 02 2020