login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #21 Feb 22 2022 03:40:52

%S 1,2,3,41,2341,9,1374473,7,123,13,49,53,91,689,5391689,167,8429,17,11,

%T 21,211,37,89,2113789,47,89211378947,1336372981,43,169,7213,47966357,

%U 121,13681,29863,9848521381,173,23,2997821,29,39,19,97973,130665991,727,251,817

%N 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).

%H Jon E. Schoenfield, <a href="/A351820/b351820.txt">Table of n, a(n) for n = 1..5000</a>

%e a(4) = 41 is the smallest unused integer that divides 123;

%e a(5) = 2341 is the smallest unused integer that divides 2341;

%e a(6) = 9 is the smallest unused integer that divides 3412341;

%e a(7) = 1374473 is the smallest unused integer that divides 4123419; etc.

%t 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 *)

%o (Python)

%o from sympy import divisors

%o def aupton(terms):

%o alst, aset = [1, 2, 3], {1, 2, 3}

%o while len(alst) < terms:

%o concat = int("".join(map(str, alst[-3:])))

%o an = min(d for d in divisors(concat) if d not in aset)

%o alst.append(an); aset.add(an)

%o return alst

%o print(aupton(46)) # _Michael S. Branicky_, Feb 20 2022

%Y Cf. A085946, A351629.

%K base,nonn

%O 1,2

%A _Carole Dubois_ and _Eric Angelini_, Feb 20 2022

%E a(26) and beyond from _Michael S. Branicky_, Feb 20 2022