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

A342356 a(1) = 1, a(2) = 10; for n > 2, a(n) is the least positive integer not occurring earlier that shares both a factor and a digit with a(n-1).

Original entry on oeis.org

1, 10, 12, 2, 20, 22, 24, 4, 14, 16, 6, 26, 28, 8, 18, 15, 5, 25, 35, 30, 3, 33, 36, 32, 34, 38, 48, 40, 42, 21, 27, 57, 45, 50, 52, 54, 44, 46, 56, 58, 68, 60, 62, 64, 66, 63, 39, 9, 69, 90, 70, 7, 77, 147, 49, 84, 74, 37, 333, 93, 31, 124, 72, 75, 51, 17, 102, 80, 78, 76, 86, 82, 88, 98, 91
Offset: 1

Views

Author

Scott R. Shannon, Mar 08 2021

Keywords

Comments

After 100000 terms the lowest unused number is 18181. The sequence is likely a permutation of the positive integers.

Crossrefs

Cf. A342366 (share factor but not digit), A239664 (no shared factor or digit), A342367 (share digit but not factor), A184992, A309151, A249591.

Programs

  • Mathematica
    Block[{a = {1, 10}, m = {1, 0}, k}, Do[k = 2; While[Nand[FreeQ[a, k], GCD[k, a[[-1]]] > 1, IntersectingQ[m, IntegerDigits[k]]], k++]; AppendTo[a, k]; Set[m, IntegerDigits[k]], {i, 73}]; a] (* Michael De Vlieger, Mar 11 2021 *)
  • Python
    from sympy import factorint
    def aupton(terms):
      alst, aset = [1, 10], {1, 10}
      for n in range(3, terms+1):
        an = 1
        anm1_digs, anm1_factors = set(str(alst[-1])), set(factorint(alst[-1]))
        while True:
          while an in aset: an += 1
          if set(str(an)) & anm1_digs != set():
            if set(factorint(an)) & anm1_factors != set():
              alst.append(an); aset.add(an); break
          an += 1
      return alst
    print(aupton(75)) # Michael S. Branicky, Mar 09 2021

A342366 a(1) = 1, a(2) = 2; for n > 2, a(n) is the least positive integer not occurring earlier that shares a factor but not a digit with a(n-1).

Original entry on oeis.org

1, 2, 4, 6, 3, 9, 12, 8, 10, 5, 20, 14, 7, 21, 30, 15, 24, 16, 22, 11, 33, 18, 26, 13, 52, 34, 17, 68, 32, 40, 25, 60, 27, 36, 28, 35, 42, 38, 19, 57, 39, 45, 63, 48, 50, 44, 55, 66, 51, 69, 23, 46, 58, 29, 87, 54, 62, 31, 248, 56, 49, 70, 64, 72, 80, 65, 78, 90, 74, 82, 41, 205, 164, 88, 76, 84
Offset: 1

Views

Author

Scott R. Shannon, Mar 09 2021

Keywords

Comments

After 100000 terms the lowest unused number is 1523. It is unknown if the sequence is a permutation of the positive integers.

Crossrefs

Cf. A342356 (share factor and digit), A239664 (no shared factor or digit), A342367 (share digit but not factor), A184992, A309151, A249591.

Programs

  • Mathematica
    Block[{a = {1, 2}, m = {2}, k}, Do[k = 2; While[Nand[FreeQ[a, k], GCD[k, a[[-1]]] > 1, ! IntersectingQ[m, IntegerDigits[k]]], k++]; AppendTo[a, k]; Set[m, IntegerDigits[k]], {i, 74}]; a] (* Michael De Vlieger, Mar 11 2021 *)
  • Python
    from sympy import factorint
    def aupton(terms):
      alst, aset = [1, 2], {1, 2}
      for n in range(3, terms+1):
        an = 1
        anm1_digs, anm1_factors = set(str(alst[-1])), set(factorint(alst[-1]))
        while True:
          while an in aset: an += 1
          if set(str(an)) & anm1_digs == set():
            if set(factorint(an)) & anm1_factors != set():
              alst.append(an); aset.add(an); break
          an += 1
      return alst
    print(aupton(76)) # Michael S. Branicky, Mar 09 2021
Showing 1-2 of 2 results.