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.

Showing 1-5 of 5 results.

A342441 a(1) = 1; 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

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 14, 15, 17, 16, 18, 12, 21, 19, 25, 22, 23, 26, 24, 27, 28, 29, 31, 33, 32, 34, 35, 36, 38, 39, 41, 42, 43, 37, 44, 45, 46, 47, 48, 51, 149, 53, 49, 52, 54, 55, 56, 57, 59, 58, 63, 64, 65, 66, 67, 68, 62, 69, 72, 73, 75, 85, 77, 74, 76, 78, 82, 79
Offset: 1

Views

Author

Scott R. Shannon, Mar 12 2021

Keywords

Comments

No term can end in 0 as that would result in the last digit of a(n-1) being the same as the last digit of a(n-1)+a(n).

Examples

			a(2) = 2 as a(1)+2 = 1+2 = 3 which shares no digit with a(1) = 1 or 2.
a(10) = 11 as a(9)+11 = 9+11 = 20 which shares no digit with a(9) = 9 or 11. Note that the first number skipped is 10 as 9+10 = 19 which shares a digit with 9.
a(11) = 13 as a(10)+13 = 11+13 = 24 which shares no digit with a(10) = 11 or 13. Note that the number 12 is skipped as 11+12 = 23 which shares a digit with 12.
		

Crossrefs

Cf. A342442 (multiplication), A276633, A010784, A043537, A043096, A338466, A336285.

Programs

  • Mathematica
    Block[{a = {1}, m = {1}, d, s, k}, Do[k = 2; While[Nand[FreeQ[a, k], ! IntersectingQ[Set[d, IntegerDigits[k]], Set[s, IntegerDigits[a[[-1]] + k]]], ! IntersectingQ[s, m]], k++]; AppendTo[a, k]; Set[m, d], 72]; a] (* Michael De Vlieger, Mar 20 2021 *)
  • Python
    def aupton(terms):
      alst, aset = [1], {1}
      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(73)) # Michael S. Branicky, Mar 20 2021

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

A342383 a(0) = 0; for n > 0, a(n) is the least positive integer not occurring earlier such that both the digits in a(n) and the digits in a(n-1)+a(n) are all distinct.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 6, 8, 9, 10, 13, 12, 14, 15, 16, 18, 17, 19, 20, 21, 24, 23, 25, 26, 27, 29, 28, 30, 31, 32, 35, 34, 36, 37, 38, 40, 39, 41, 42, 43, 46, 45, 47, 48, 49, 53, 50, 52, 51, 54, 69, 56, 64, 59, 61, 62, 58, 65, 60, 63, 57, 67, 68, 70, 72, 71, 74, 73, 75, 78, 76, 80, 79, 81, 82, 83
Offset: 0

Views

Author

Scott R. Shannon, Mar 09 2021

Keywords

Comments

The sequence is finite due to the finite number of positive integers with distinct digits, see A010784, although the exact number of terms is currently unknown.

Examples

			a(1) = 1 as 1 has one distinct digit and a(0)+1 = 0+1 = 1 which has one distinct digit 0.
a(6) = 7 as 7 has one distinct digit and a(5)+7 = 5+7 = 12 which has two distinct digits. Note that 6 is the first skipped number as a(5)+6 = 5+6 = 11 has 1 as a duplicate digit.
a(11) = 13 as 13 has two distinct digits and a(10)+13 = 10+13 = 23 which has two distinct digits. Note that 11 and 12 are skipped as 11 has 1 as a duplicate digit while a(10)+12 = 10+12 = 22 has 2 as a duplicate digit.
		

Crossrefs

Programs

  • Mathematica
    Block[{a = {0}, k, m = 10^4}, Do[k = 1; While[Nand[FreeQ[a, k], AllTrue[DigitCount[a[[-1]] + k], # < 2 &], AllTrue[DigitCount[k], # < 2 &]], If[k > m, Break[]]; k++]; If[k > m, Break[]]; AppendTo[a, k], {i, 76}]; a] (* Michael De Vlieger, Mar 11 2021 *)
  • Python
    def agen():
      alst, aset = [0], {0}
      yield 0
      while True:
        an = 1
        while True:
          while an in aset: an += 1
          stran, t = str(an), str(alst[-1] + an)
          if len(stran) == len(set(stran)) and len(t) == len(set(t)):
            alst.append(an); aset.add(an); yield an; break
          an += 1
    g = agen()
    print([next(g) for n in range(77)]) # Michael S. Branicky, Mar 11 2021

A342755 a(1) = 2; for n > 1, a(n) is the least positive integer not occurring earlier such that a(n) shares no digit with a(n-1) and 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, 15, 22, 14, 55, 12, 37, 16, 25, 36, 29, 47, 23, 46, 13, 44, 18, 32, 17, 38, 19, 33, 26, 35, 174, 53, 76, 59, 34, 27, 43, 67, 49, 62, 87, 106, 493, 57, 24, 75, 48, 65, 122, 39, 54, 72, 88, 45, 66, 73, 56, 77, 52, 79, 84, 63, 78, 123, 69, 58, 64, 92, 74, 68, 114, 85, 314
Offset: 1

Views

Author

Scott R. Shannon, Mar 20 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. Currently the last known term is a(173) = 922989, the next being at least 5*10^10 if it exists. It is unknown if the sequence is infinite.
a(174) = 60060666070067077 and a(175) has 52 digits (see b-file). If a(176) exists, it is > 10^71. - Michael S. Branicky, Apr 10 2023

Examples

			a(2) = 3 as 3 shares no digit with a(1) = 2 and a(1)*3 = 2*3 = 6 shares no digit with a(1) = 2 or 3.
a(9) = 42 as 42 shares no digit with a(8) = 9 and a(8)*42 = 9*42 = 378 shares no digit with a(8) = 9 or 42.
a(10) = 15 as 15 shares no digit with a(9) = 42 and a(9)*15 = 42*15 = 630 shares no digit with a(9) = 42 or 15. This is the first term that differs from A342442.
a(173) = 922989 as 922989 shares no digit with a(172) = 7154 and a(172)*922989 = 7154*922989 = 6603063306 shares no digit with a(172) = 7154 or 922989. This is currently the last known term.
		

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
          an_digs = set(str(an))
          if (an_digs & anm1_digs) == set():
            prod_digs = set(str(an*alst[-1]))
            if (anm1_digs | an_digs) & prod_digs  == set():
              alst.append(an); aset.add(an); break
          an += 1
      return alst
    print(aupton(173)) # Michael S. Branicky, Mar 21 2021

A336478 Lexicographically earliest sequence of distinct positive terms such that the sum of two consecutive terms has distinct digits in primorial base.

Original entry on oeis.org

1, 3, 2, 8, 5, 9, 4, 6, 7, 12, 10, 13, 15, 11, 14, 38, 20, 32, 26, 53, 27, 25, 33, 19, 39, 40, 18, 34, 24, 28, 30, 22, 36, 16, 42, 37, 21, 31, 48, 47, 56, 23, 29, 50, 35, 17, 41, 44, 51, 49, 46, 54, 61, 43, 52, 63, 55, 45, 58, 57, 59, 60, 65, 68, 62, 71, 69
Offset: 1

Views

Author

Rémy Sigrist, Jul 22 2020

Keywords

Comments

In other words, for any n > 0, a(n) + a(n+1) belongs to A321683.

Examples

			The first terms, alongside the primorial representation of a(n)+a(n+1), are:
  n   a(n)  prim(a(n)+a(n+1))
  --  ----  -----------------
   1     1    (2,0)
   2     3    (2,1)
   3     2  (1,2,0)
   4     8  (2,0,1)
   5     5  (2,1,0)
   6     9  (2,0,1)
   7     4  (1,2,0)
   8     6  (2,0,1)
   9     7  (3,0,1)
  10    12  (3,2,0)
  11    10  (3,2,1)
  12    13  (4,2,0)
  13    15  (4,1,0)
  14    11  (4,0,1)
		

Crossrefs

Programs

  • PARI
    See Links section.
Showing 1-5 of 5 results.