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-4 of 4 results.

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

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Mar 09 2021

Keywords

Comments

The sequence is finite, the 71782nd term being a(71781) = 50005 beyond which no number exists that has not occurred earlier such that 50005*a(n) has distinct digits. The maximum term is a(71428) = 175446.

Examples

			a(1) = 1 as a(0)*1 = 0*1 = 0 which has one distinct digit 0.
a(10) = 10 as a(9)*10 = 9*10 = 90 which has two distinct digits 9 and 0.
a(11) = 12 as a(10)*12 = 10*12 = 120 which has three distinct digits. Note that 11 is the first skipped number as 10*11 = 110 which has 1 as a duplicate digit.
a(12) = 11 as a(11)*11 = 12*11 = 132 which has three distinct digits.
		

Crossrefs

Extensions

Offset corrected by N. J. A. Sloane, Jun 16 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

A368181 a(1) = 1; for n > 1, a(n) is the smallest positive integer that has not yet appeared which shares no digit with the sum of all previous terms a(1)..a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Dec 21 2023

Keywords

Comments

The sequence is finite; after 14594 terms, where a(14594) = 20858, the sum of all terms is 173658294 which contains the digits 1..9, so the next term does not exist.
The largest term is a(12742) = 888888.

Examples

			a(14) = 20 as the sum of all terms a(1)..a(13) = 91, and 20 is the smallest unused number that does not contain the digits 1 or 9.
		

Crossrefs

Programs

  • Python
    from itertools import islice
    def agen():
      s, aset, mink = 0, {0}, 1
      while True:
          k, dset = mink, set(str(s))
          if dset >= set("123456789"): break
          while k in aset or set(str(k)) & dset: k += 1
          an = k; aset.add(an); s += an; yield an
          while mink in aset: mink += 1
    print(list(islice(agen(), 80))) # Michael S. Branicky, Dec 21 2023

A368347 a(1) = 1; for n > 1, a(n) is the smallest positive integer that has not yet appeared which contains all the distinct digits of the sum of all previous terms a(1)..a(n-1).

Original entry on oeis.org

1, 10, 11, 2, 24, 48, 69, 156, 123, 4, 84, 235, 67, 348, 128, 103, 134, 1457, 304, 308, 136, 2357, 1069, 178, 3567, 10239, 126, 182, 10247, 137, 13458, 12345, 567, 2458, 2068, 20567, 1378, 45689, 10348, 102347, 203479, 4568, 12456, 234568, 105689, 3089, 20689, 12678, 204589, 1048, 1023459
Offset: 1

Views

Author

Scott R. Shannon, Dec 22 2023

Keywords

Comments

The sequence is infinite, although it is unknown if all positive numbers eventually appear. In the first 50000 terms the smallest number not to have appeared is 3. In the same range the largest value is a(49134) = 1023548967, with the sum of all previous terms at that point being 553402987165.

Examples

			a(3) = 11 as the sum of the first two terms is 1 + 10 = 11, which contains the distinct digit 1, and 11 is the smallest unused number to contain 1.
a(4) = 2 as the sum of the first three terms is 1 + 10 + 11 = 22, which contains the distinct digit 2, and 2 is the smallest unused number to contain 2.
a(5) = 24 as the sum of the first four terms is 1 + 10 + 11 + 2 = 24, which contains the distinct digits 2 and 4, and 24 is the smallest unused number to contain 2 and 4.
		

Crossrefs

Showing 1-4 of 4 results.