login
a(n) = (2*n - sigma(n))/gcd(n, sigma(n)).
3

%I #43 Nov 13 2025 13:42:46

%S 1,1,2,1,4,0,6,1,5,1,10,-1,12,2,2,1,16,-1,18,-1,10,4,22,-1,19,5,14,0,

%T 28,-2,30,1,6,7,22,-19,36,8,22,-1,40,-2,42,1,4,10,46,-7,41,7,10,3,52,

%U -2,38,-1,34,13,58,-4,60,14,22,1,46,-2,66,5,14,-2,70,-17

%N a(n) = (2*n - sigma(n))/gcd(n, sigma(n)).

%C Empirical observation: mumbers in this sequence that are positive and close to 1 are more likely to produce regular amicable pairs under the Wiethaus's Rule (see Garcia et al).

%C The positions of -1's in the sequence are given by A153501.

%C The positions of 0's in the sequence are given by A000396.

%C The positions of 1's in the sequence are given by A271816.

%C If a(n) is negative, n is abundant (A005101).

%C If a(n) is positive, n is deficient (A005100).

%C If instead a(n) is 0, n is perfect (A000396).

%H Hayden Chesnut, <a href="/A390582/b390582.txt">Table of n, a(n) for n = 1..10000</a>

%H M. GarcĂ­a, J.M. Pedersen and H.J.J. te Riele, <a href="https://ir.cwi.nl/pub/10756/">Amicable pairs : a survey</a>, Fields Institute Communications, 41 (2004), 1-19. See p. 193.

%F a(n) = A033879(n)/A009194(n).

%F a(prime(n)) = prime(n) - 1, and those are also the records. - _Peter Luschny_, Nov 13 2025

%e For n = 1, (2*n - sigma(n)) = 1 and gcd(n,sigma(n)) = 1 so (2*n - sigma(n))/gcd(n, sigma(n)) = 1.

%e For n = 9, a(prime(9)) = 22 = prime(9) - 1;

%p a := proc(n) NumberTheory:-SumOfDivisors(n); (2*n - %)/igcd(n, %) end: seq(a(n), n = 1..72); # _Peter Luschny_, Nov 11 2025

%t a[n_] := (2*n - #)/GCD[n, #]& @ DivisorSigma[1, n]; Array[a, 100] (* _Amiram Eldar_, Nov 11 2025 *)

%o (Python)

%o from sympy import divisor_sigma,gcd

%o lists = []

%o for A1 in range(1,1000):

%o A2 = divisor_sigma(A1)

%o A3 = gcd(A1,A2)

%o lists.append((A1*2-A2)/A3)

%o print(lists[:100])

%o (PARI) a(n) = my(s=sigma(n)); (2*n-s)/gcd(n,s); \\ _Michel Marcus_, Nov 11 2025

%Y Cf. A000203 (sigma), A000396, A005100, A005101, A009194, A033879, A153501, A271816.

%K sign,easy

%O 1,3

%A _Hayden Chesnut_, Nov 11 2025