login
Excluding powers of 2 and perfect numbers, numbers whose abundancy is closer to 2 than any smaller number.
1

%I #8 Jun 21 2026 18:20:23

%S 3,9,10,18,20,44,70,88,104,136,464,650,1888,1952,4030,5830,8384,17816,

%T 18632,32128,32896,116624,130304,442365,521728,522752,1848964,5546958,

%U 5546994,5547018,5547138,5547162,5547174,5547306,5547342,5547606,5547702,5547846

%N Excluding powers of 2 and perfect numbers, numbers whose abundancy is closer to 2 than any smaller number.

%C The smallest n values where a(n) is odd are 1, 2, 24, and 95166.

%C For n > 22, the smallest n values where a(n) is deficient are 95163, 95165, and 95166.

%H Hoang Nguyen, <a href="/A397099/b397099.txt">Table of n, a(n) for n = 1..10000</a>

%e 3's abundancy is (1+3)/3 = 4/3, which is 2/3 away from 2.

%e 9's abundancy is (1+3+9)/9 = 13/9, which is 5/9 (< 2/3) away from 2.

%e 10's abundancy is (1+2+5+10)/10 = 9/5, which is 1/5 (< 5/9) away from 2.

%o (Julia)

%o using Primes

%o function a(n)

%o min = 2

%o i = 1

%o num = 0

%o while i <= n

%o num += 1

%o diff = abs(sum(divisors(num)) // num - 2)

%o if diff < min && diff != 0 && !ispow2(num)

%o min = diff

%o print("$num, ")

%o i += 1

%o end

%o end

%o end

%Y Subsequence of the union of A071927 and A228450.

%Y Cf. A171929.

%K nonn

%O 1,1

%A _Hoang Nguyen_, Jun 16 2026