%I #63 Mar 15 2026 18:45:51
%S 2,6,14,22,30,18,15,23,27,35,43,47,51,59,63,75,87,95,103,107,111,119,
%T 127,131,135,151,155,163,167,171,183,191,195,211,215,223,227,231,247,
%U 255,271,275,287,295,303,311,315,339,347,351,367,371,379,383,387,399
%N a(n+1) = a(n) + 2*d(a(n)) if s(a(n)) <= a(n), else 2*a(n) - s(a(n)), with a(1) = 2; d(k) is the number of divisors of k A000005 and s(k) is the aliquot sum of k A001065.
%C The sequence becomes periodic starting from a(900).
%H Adam Karol Drażyk, <a href="/A392092/b392092.txt">Table of n, a(n) for n = 1..2000</a>
%F a(n+1) = if s(a(n)) <= a(n) then a(n) + 2*d(a(n)) else 2*a(n) - s(a(n)), where s(k) is A001065(k) and d(k) is A000005(k).
%e Starting with a(1) = 2.
%e Sum of proper divisors of 2 is less than 2, so 2 + 2 * d(2) = 2 + 2 * 2 = 6. So a(2) = 6.
%e Sum of proper divisors of 6 is equal to 6, so 6 + 2 * d(6) = 6 + 2 * 4 = 14. So a(3) = 14
%e Sum of proper divisors of 14 is less than 14, so 14 + 2 * d(14) = 14 + 2 * 4 = 22. So a(4) = 22.
%e Sum of proper divisors of 22 is less than 22, so 22 + 2 * d(22) = 22 + 2 * 4 = 30. So a(5) = 30.
%e Sum of proper divisors of 30 is greater than 30, so 2 * 30 - s(30) = 2 * 30 - 42 = 18, where s(n) is the sum of proper divisors of n. So a(6) = 18.
%t NestWhileList[If[DivisorSigma[1, #] <= 2*#, # + 2*DivisorSigma[0, #], 3*# - DivisorSigma[1, #]] &, 2, Unequal, All]
%Y Cf. A000005, A001065, A394060 (different initial values).
%K nonn
%O 1,1
%A _Adam Karol Drażyk_, Mar 06 2026