login
A351820
a(1) = 1, a(2) = 2, a(3) = 3 and a(n) is the smallest number not included earlier that divides the concatenation a(n-3), a(n-2), a(n-1).
1
1, 2, 3, 41, 2341, 9, 1374473, 7, 123, 13, 49, 53, 91, 689, 5391689, 167, 8429, 17, 11, 21, 211, 37, 89, 2113789, 47, 89211378947, 1336372981, 43, 169, 7213, 47966357, 121, 13681, 29863, 9848521381, 173, 23, 2997821, 29, 39, 19, 97973, 130665991, 727, 251, 817
OFFSET
1,2
LINKS
EXAMPLE
a(4) = 41 is the smallest unused integer that divides 123;
a(5) = 2341 is the smallest unused integer that divides 2341;
a(6) = 9 is the smallest unused integer that divides 3412341;
a(7) = 1374473 is the smallest unused integer that divides 4123419; etc.
MATHEMATICA
nn = 46; s = Range[3]; c[_] = 0; Array[Set[{a[#1], c[#2]}, {#2, #1}] & @@ {#, s[[#1]]} &, Length[s]]; Do[(Set[{a[n], c[#]}, {#, n}] &@ SelectFirst[Divisors[FromDigits@ Flatten@ Map[IntegerDigits, Reverse@ Array[a[n - #] &, 3]]], c[#] == 0 &]), {n, 1 + Length[s], nn}]; Array[a[#] &, nn] (* Michael De Vlieger, Feb 20 2022 *)
PROG
(Python)
from sympy import divisors
def aupton(terms):
alst, aset = [1, 2, 3], {1, 2, 3}
while len(alst) < terms:
concat = int("".join(map(str, alst[-3:])))
an = min(d for d in divisors(concat) if d not in aset)
alst.append(an); aset.add(an)
return alst
print(aupton(46)) # Michael S. Branicky, Feb 20 2022
CROSSREFS
Sequence in context: A042475 A241277 A123993 * A271331 A101821 A121475
KEYWORD
base,nonn
AUTHOR
Carole Dubois and Eric Angelini, Feb 20 2022
EXTENSIONS
a(26) and beyond from Michael S. Branicky, Feb 20 2022
STATUS
approved