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

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

A368559 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number not occurring earlier such that a(n) contains all the distinct digits of a(n-1) - a(n-2).

Original entry on oeis.org

1, 2, 10, 8, 12, 4, 18, 14, 24, 100, 67, 3, 46, 34, 21, 13, 28, 15, 31, 16, 51, 35, 61, 26, 53, 27, 62, 135, 37, 89, 25, 64, 39, 52, 103, 105, 20, 58, 38, 102, 146, 40, 106, 6, 101, 59, 42, 17, 125, 108, 71, 73, 22, 115, 93, 23, 70, 47, 32, 145, 113, 123, 104, 19, 85, 36, 49, 130, 81, 94
Offset: 1

Views

Author

Scott R. Shannon, Dec 30 2023

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers. The fixed points begin 1, 2, 95, 122, 156, 318, 1644, 1964, 2189, 2740, 8264, 16904, ... although it is likely there are infinitely more.

Examples

			a(3) = 10 as a(2) - a(1) = 2 - 1 = 1, and 10 is the smallest unused number to contain 1.
a(11) = 67 as a(10) - a(9) = 100 - 24 = 76, and 67 is the smallest unused number to contain 7 and 6.
		

Crossrefs

Showing 1-3 of 3 results.