login
a(n) = numerator(sigma(n)/n) - sigma(denominator(sigma(n)/n)).
4

%I #22 Jan 10 2022 22:34:36

%S 0,0,0,0,0,1,0,0,0,3,0,3,0,4,2,0,0,1,0,3,0,6,0,2,0,7,0,1,0,6,0,0,4,9,

%T 0,0,0,10,0,2,0,8,0,9,2,12,0,3,0,0,6,7,0,7,0,7,0,15,0,8,0,16,0,0,0,12,

%U 0,9,8,24,0,5,0,19,0,15,0,14,0,3,0,21,0

%N a(n) = numerator(sigma(n)/n) - sigma(denominator(sigma(n)/n)).

%C a(n) is the integer t, such that if sigma(n)/n is written in its reduced form, nk/dk = A017665(n)/A017666(n), then we have (sigma(dk)+t)/dk.

%C It appears that a(n) is never negative.

%C a(n) = 0 if and only if n is in A014567 (n and sigma(n) are relatively prime).

%H Reinhard Zumkeller, <a href="/A240923/b240923.txt">Table of n, a(n) for n = 1..10000</a>

%H William G. Stanton and Judy A. Holdener, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL10/Holdener/holdener7.html">Abundancy "Outlaws" of the Form (sigma(N) + t)/N</a>, Journal of Integer Sequences , Vol 10 (2007) , Article 07.9.6.

%e For n=10, sigma(10)/10 = 18/10 = 9/5 = (sigma(5) + 3)/5, hence a(10)=3.

%p with(numtheory): A240923:=n->numer(sigma(n)/n) - sigma(denom(sigma(n)/n)): seq(A240923(n), n=1..100); # _Wesley Ivan Hurt_, Aug 06 2014

%t Table[Numerator[DivisorSigma[1, n]/n] - DivisorSigma[1, Denominator[ DivisorSigma[1, n]/n]], {n, 100}] (* _Wesley Ivan Hurt_, Aug 06 2014 *)

%o (PARI) a(n) = my(ab = sigma(n)/n); numerator(ab) - sigma(denominator(ab));

%o (Haskell)

%o import Data.Ratio ((%), numerator, denominator)

%o a240923 n = numerator sq - a000203 (denominator sq)

%o where sq = a000203 n % n

%o -- _Reinhard Zumkeller_, Aug 05 2014

%o (Python)

%o from gmpy2 import mpq

%o from sympy import divisors

%o map(lambda x: x.numerator-sum(divisors(x.denominator)),[mpq(sum(divisors(n)),n) for n in range(1,10**5)]) # _Chai Wah Wu_, Aug 05 2014

%Y Cf. A014567, A017665, A017666.

%Y Cf. A000203.

%K nonn

%O 1,10

%A _Michel Marcus_, Aug 03 2014