OFFSET
1,2
EXAMPLE
a(1) = 1 by definition. As a(1) has no available divisor not yet present in the sequence, we concatenate 1 with itself to produce 11.
a(2) = 11; as 11 has no available divisor not yet present in the sequence, we concatenate 1 with 11 to produce 111.
a(3) = 111; as 111 produces the new divisor 3, we have a(4) = 3; etc.
MATHEMATICA
a[1]=1; t=1; a[n_]:=a[n]=If[b=FromDigits[Join@@IntegerDigits/@Table[a[n-t], t+1]]; Length[d=Divisors@a[n-1]]>2, If[(s=Complement[Most@Rest@d, Array[a, n-1]])!={}, t=1; Min@s, t++; b], t++; b]; Array[a, 56] (* Giorgos Kalogeropoulos, Nov 03 2021 *)
PROG
(Python)
from sympy import divisors
terms = [1]
c = 1
for i in range(100):
for j in divisors(terms[-1]):
if j not in terms:
terms.append(j)
c = j
break
else:
terms.append(int(str(terms[-1]) + str(c)))
print(terms) # Gleb Ivanov, Nov 09 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric Angelini and Carole Dubois, Nov 02 2021
STATUS
approved