login
A342999
a(n) is always followed by the concatenation of a(n)'s distinct prime factors in increasing order. If this concatenation is already in the sequence, a(n+1) is the smallest term not yet present.
0
1, 2, 3, 4, 5, 6, 23, 7, 8, 9, 10, 25, 11, 12, 13, 14, 27, 15, 35, 57, 319, 1129, 16, 17, 18, 19, 20, 21, 37, 22, 211, 24, 26, 213, 371, 753, 3251, 28, 29, 30, 235, 547, 31, 32, 33, 311, 34, 217, 731, 1743, 3783, 31397, 36, 38, 219, 373, 39, 313, 40, 41, 42, 237, 379, 43, 44, 45, 46, 223, 47
OFFSET
1,2
COMMENTS
This is a permutation of the positive terms.
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
Cf. A084317 (concatenation of the prime factors of n, in increasing order), A037276 (replace n with the concatenation of its prime factors in increasing order).
Sequence in context: A208450 A037333 A183529 * A037404 A037440 A130604
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Apr 02 2021
STATUS
approved