cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Mar 12 2021

Keywords

Comments

No term can end in 0 or 1 as that would result in the last digit of a(n-1)*a(n) being the same as a(n)'s last digit. The majority of terms appear to grow linearly with n but occasional large spikes in the values also occur, e.g. a(47888) = 425956849. See the examples. It is unknown if the sequence is infinite.

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.
		

Crossrefs

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