A342442 a(1) = 2; for n > 1, a(n) is the least positive integer not occurring earlier such that a(n-1)*a(n) shares no digit with either a(n-1) or a(n).
2, 3, 4, 5, 6, 7, 8, 9, 42, 14, 17, 18, 15, 16, 13, 19, 32, 22, 23, 26, 29, 12, 25, 24, 34, 27, 33, 36, 39, 43, 37, 38, 28, 47, 44, 45, 46, 63, 66, 65, 48, 49, 62, 55, 54, 35, 174, 53, 76, 57, 56, 59, 52, 58, 64, 92, 74, 68, 78, 72, 77, 67, 73, 83, 69, 79, 84, 75, 88, 113, 183, 138, 149, 148
Offset: 1
Examples
a(2) = 3 as a(1)*3 = 2*3 = 6 which shares no digit with a(1) = 2 or 3. a(9) = 42 as a(8)*42 = 9*42 = 378 which shares no digit with a(8) = 9 or 42. a(10) = 14 as a(9)*14 = 42*14 = 588 which shares no digit with a(9) = 42 or 14. a(47888) = 425956849 as a(47887)*425956849 = 258649*425956849 = 110173313037001 which shares no digit with a(47887) = 258649 or 425956849.
Links
- Daniel Mondot, Table of n, a(n) for n = 1..10000
Programs
-
Python
def aupton(terms): alst, aset = [2], {2} while len(alst) < terms: an, anm1_digs = 2, set(str(alst[-1])) while True: while an in aset: an += 1 if (set(str(an)) | anm1_digs) & set(str(an*alst[-1])) == set(): alst.append(an); aset.add(an); break an += 1 return alst print(aupton(74)) # Michael S. Branicky, Mar 20 2021
Comments