OFFSET
1,2
COMMENTS
This is a permutation of the positive terms.
LINKS
EXAMPLE
a(6) is not = 5, though the only prime factor of a(5) is precisely 5; but as 5 is already in the sequence we must take a(6) = 6, the smallest term not yet present in the sequence.
a(7) = 23 as the prime factors of a(6) = 6 are 2 and 3, which, concatenated in increasing order, give 23;
a(8) is not = 23, though the only prime factor of a(7) is precisely 23; but as 23 is already in the sequence we must take a(8) = 7, the smallest term not yet present in the sequence; etc.
MATHEMATICA
a[1]=1; a[n_]:=a[n]=(g=FromDigits@Flatten[IntegerDigits@*First/@FactorInteger@a[n-1]]; If[FreeQ[k=Array[a, n-1], g], g, Min@Complement[Range@Max[k+1], k]])
Array[a, 100] (* Giorgos Kalogeropoulos, Apr 02 2021 *)
PROG
(Python)
from sympy import primefactors
def aupton(terms):
alst, aset = [1, 2], {1, 2}
while len(alst) < terms:
an = int("".join(map(str, primefactors(alst[-1]))))
if an in aset:
an = 1
while an in aset: an += 1
alst.append(an); aset.add(an)
return alst[:terms]
print(aupton(100)) # Michael S. Branicky, Apr 02 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Apr 02 2021
STATUS
approved