OFFSET
1,2
COMMENTS
When n is prime, no smaller divisor is available, so a(n) = n. It can be shown than a(n) < n if n is composite. Similar to Golomb's sequence (A001462), but with the added condition that a(n) divides n.
LINKS
John Tyler Rascoe, Table of n, a(n) for n = 1..10000
PROG
(Python)
from sympy import divisors
def A(maxn):
A = []
for n in range(1, maxn+1):
d = divisors(n)
for j in range(0, len(d)):
if d[j] > len(A): break
if A.count(d[j]) < A[d[j]-1]: break
A.append(d[j])
return(A) # John Tyler Rascoe, Mar 04 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Mar 16 2006
STATUS
approved