OFFSET
1,2
COMMENTS
The sequence is possibly a permutation of the positive integers as when a(n-1) is prime a(n) will be the next smallest number that has not previously occurred. However this will depend on the likelihood of a(n) being a prime as n goes to infinity. For the first 478 terms the last prime is a(144) = 59, while a(478) = 19140499834691254267668, indicating prime values become increasingly rare, and could potentially have a finite number as n->infinity.
The sum of the proper divisors of n is given by A001065(n).
LINKS
Scott R. Shannon, Table of n, a(n) for n = 1..478
Wikipedia, Aliquot sum.
EXAMPLE
a(3) = 3 as s(a(2)) = s(2) = 1, and 3 is the smallest multiple of 1 that has not previously occurred.
a(5) = 6 as s(a(4)) = s(4) = 3, and as 3 has already occurred the next lowest multiple is used, being 6.
a(12) = 5 as s(a(11)) = s(7) = 1, and 5 is the smallest multiple of 1 that has not previously occurred.
PROG
(Python)
from sympy import divisors
def s(k): return sum(d for d in divisors(k)[:-1])
def aupto(n):
alst, aset = [1, 2], {1, 2}
for k in range(2, n):
ak = sanm1 = s(alst[-1])
while ak in aset: ak += sanm1
alst.append(ak); aset.add(ak)
return alst # use alst[n-1] for a(n)
print(aupto(478)) # Michael S. Branicky, Dec 29 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Dec 17 2020
STATUS
approved