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.

Previous Showing 31-40 of 85 results. Next

A280594 Nonnegative numbers whose digits can be formed by typing adjacent keys on a 123-456-789-X0X keypad without repeating a digit.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 21, 23, 25, 32, 36, 41, 45, 47, 52, 54, 56, 58, 63, 65, 69, 74, 78, 80, 85, 87, 89, 96, 98, 123, 125, 145, 147, 214, 236, 254, 256, 258, 321, 325, 365, 369, 412, 452, 456, 458, 478, 521, 523, 541, 547, 563, 569, 580, 587, 589, 632, 652, 654, 658, 698, 741
Offset: 1

Views

Author

FUNG Cheok Yin, Jan 06 2017

Keywords

Comments

Number of terms < 10^k for k = 1,2,3,...: 10, 35, 82, 167, 281, 419, 547, 669, 723. - Robert G. Wilson v, Feb 06 2017
A subsequence of A010784. - FUNG Cheok Yin, Jul 05 2018

Examples

			The keypad is:
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 4 | 5 | 6 |
+---+---+---+
| 7 | 8 | 9 |
+---+---+---+
| x | 0 | x |
+---+---+---+
It is visibly obvious that 2580 can be formed on the keypad.
		

Crossrefs

Programs

  • Mathematica
    g = Graph[{1 <-> 2, 1 <-> 4,
        2 <-> 1, 2 <-> 3, 2 <-> 5,
        3 <-> 2, 3 <-> 6,
        4 <-> 1, 4 <-> 5, 4 <-> 7,
        5 <-> 2, 5 <-> 4, 5 <-> 6, 5 <-> 8,
        6 <-> 3, 6 <-> 5, 6 <-> 9,
        7 <-> 4, 7 <-> 8,
        8 <-> 0, 8 <-> 5, 8 <-> 7, 8 <-> 9,
        9 <-> 6, 9 <-> 8}];
    f[{a_, b_}] := FindPath[g, a, b, Infinity, All]
    ff = f /@ Flatten[Outer[List, r = Range[9], Range[0, 9]], 1];
    A280594 = Sort[Join[r, FromDigits /@ Flatten[ff, 1]]] (* Jean-François Alcover, Jan 07 2017 *)

Extensions

Initial 0 prefixed by N. J. A. Sloane, Feb 05 2017

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

A210666 Numbers with at least three digits in which all digits but one are the same.

Original entry on oeis.org

100, 101, 110, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 131, 133, 141, 144, 151, 155, 161, 166, 171, 177, 181, 188, 191, 199, 200, 202, 211, 212, 220, 221, 223, 224, 225, 226, 227, 228, 229, 232, 233, 242, 244, 252, 255, 262, 266, 272, 277, 282, 288
Offset: 1

Views

Author

Arkadiusz Wesolowski, May 08 2012

Keywords

Comments

Each k-digit term has k-1 appearances of a digit, d1, and 1 appearance of a different digit, d2, and k-1 >= 2 so that d1 is repeated. Specifically, the 2-digit terms of A010784 are not terms here. - Michael S. Branicky, May 22 2022
a(n) = A031955(n+81) for n <= 244.
For n <= 243, i.e., the 3-digit terms, a(n) = A218556(n+10). - M. F. Hasler, Nov 02 2012

Crossrefs

Subsequence of A031955. Supersequence of A164937.

Programs

  • Mathematica
    lst = {}; Do[If[SortBy[Tally[IntegerDigits[n]], Last][[-1, -1]] == IntegerLength[n] - 1, AppendTo[lst, n]], {n, 100, 288}]; lst
    lst = {}; Do[r = Table[a, {n}]; Do[c = FromDigits@Permutations[Join[{d}, r]]; If[d == 0, c = Rest[c]]; AppendTo[lst, c], {d, 0, 9}], {a, 0, 9}, {n, 2, 2}]; Drop[Union@Flatten[lst], 19]
    nrepQ[n_] := Module[{dg = Select[DigitCount[n], # > 0 &]}, Length[dg] == 2 && Min[dg] == 1 && Max[dg] > 1]; Select[Range[300], nrepQ] (* Harvey P. Dale, Nov 20 2012 *)
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        for d in count(3):
            dterms = set()
            for most in "123456789":
                dterms.add(int(most + "0"*(d-1)))
                for diff in "0123456789":
                    if most == diff: continue
                    cands = (most*i + diff + most*(d-1-i) for i in range(d))
                    dterms.update(int(t) for t in cands if t[0] != "0")
            yield from sorted(dterms)
    print(list(islice(agen(), 52))) # Michael S. Branicky, May 17 2022

A280595 Nonnegative numbers whose digits can be formed by typing adjacent keys on a 123-456-789-00X keypad without repeating a digit.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 21, 23, 25, 32, 36, 41, 45, 47, 52, 54, 56, 58, 63, 65, 69, 70, 74, 78, 80, 85, 87, 89, 96, 98, 123, 125, 145, 147, 214, 236, 254, 256, 258, 321, 325, 365, 369, 412, 452, 456, 458, 470, 478, 521, 523, 541, 547, 563, 569, 580, 587, 589, 632, 652, 654, 658
Offset: 1

Views

Author

FUNG Cheok Yin, Jan 06 2017

Keywords

Comments

A subsequence of A010784. - FUNG Cheok Yin, Jul 05 2018

Examples

			The keypad is:
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 4 | 5 | 6 |
+---+---+---+
| 7 | 8 | 9 |
+---+---+---+
|   0   | x |
+---+---+---+
It is visibly obvious that 5807 can be formed on the keypad.
		

Crossrefs

Programs

  • Mathematica
    g = Graph[{1 <-> 2, 1 <-> 4,
        2 <-> 1, 2 <-> 3, 2 <-> 5,
        3 <-> 2, 3 <-> 6,
        4 <-> 1, 4 <-> 5, 4 <-> 7,
        5 <-> 2, 5 <-> 4, 5 <-> 6, 5 <-> 8,
        6 <-> 3, 6 <-> 5, 6 <-> 9,
        7 <-> 0, 7 <-> 4, 7 <-> 8,
        8 <-> 0, 8 <-> 5, 8 <-> 7, 8 <-> 9,
        9 <-> 6, 9 <-> 8}];
    f[{a_, b_}] := FindPath[g, a, b, Infinity, All]
    ff = f /@ Flatten[Outer[List, r = Range[9], Range[0, 9]], 1];
    A280595 = Sort[Join[r, FromDigits /@ Flatten[ff, 1]]] (* Jean-François Alcover, Jan 07 2017 *)

Extensions

Initial 0 added by N. J. A. Sloane, Feb 05 2017

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

Views

Author

Rémy Sigrist, Jul 22 2020

Keywords

Comments

In other words, for any n > 0, a(n) + a(n+1) belongs to A010784.
The sequence is finite since there are only a finite number of positive integers with distinct digits, see A010784, although the exact number of terms is currently unknown.

Examples

			The first terms, alongside a(n) + a(n+1), are:
  n   a(n)  a(n)+a(n+1)
  --  ----  -----------
   0     0            1
   1     1            3
   2     2            5
   3     3            7
   4     4            9
   5     5           12
   6     7           13
   7     6           14
   8     8           17
   9     9           19
  10    10           21
		

Crossrefs

Programs

  • PARI
    s=0; v=1; for (n=1, 67, print1 (v", "); s+=2^v; for (w=1, oo, if (!bittest(s, w) && #(d=digits(v+w))==#Set(d), v=w; break)))
    
  • Python
    def agen():
      alst, aset, min_unused = [0], {0}, 1
      yield 0
      while True:
        an = min_unused
        while True:
          while an in aset: an += 1
          t = str(alst[-1] + an)
          if len(t) == len(set(t)):
            alst.append(an); aset.add(an); yield an
            if an == min_unused: min_unused = min(set(range(max(aset)+2))-aset)
            break
          an += 1
    g = agen()
    print([next(g) for n in range(77)]) # Michael S. Branicky, Mar 11 2021

Extensions

a(0)=0 added by N. J. A. Sloane, Mar 14 2021

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

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

A156071 Concatenation chain arising in A156069.

Original entry on oeis.org

3, 38, 381, 3816, 38165, 381654, 3816547, 38165472, 381654729
Offset: 1

Views

Author

Keywords

Comments

a(9) is a zeroless pandigital number in base 10, with 9 digits such that every k-digit substring ( 1 <= k <= 9 ) taken from the left, is divisible by k (see A163574). - Michel Marcus, Dec 01 2013

References

  • Matt Parker, Things to make and do in the fourth dimension, 2015, pages 7-9.

Crossrefs

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

Views

Author

Scott R. Shannon, Mar 09 2021

Keywords

Comments

The sequence is finite, the 18351st term being a(18350) = 41987 beyond which no number exists that has not occurred earlier that has all distinct digits and that 41987*a(n) has all distinct digits. The maximum term is a(18097) = 219087.

Examples

			a(1) = 1 as 1 has one distinct digit and a(0)*1 = 0*1 = 0 which has one distinct digit 0.
a(10) = 10 as 10 has two distinct digits and a(9)*10 = 9*10 = 90 which has two distinct digits 9 and 0.
a(11) = 12 as 12 has two distinct digits and a(10)*12 = 10*12 = 120 which has three distinct digits. Note that 11 is the first skipped number as 11 has 1 as a duplicate digit.
a(16) = 19 as 19 has two distinct digits and a(15)*19 = 16*19 = 304 which has three distinct digits. Note that 17 and 18 are skipped as 16*17 = 272 while 16*18 = 288, both of which contain duplicate digits.
		

Crossrefs

Programs

  • Mathematica
    Block[{a = {0}, k, m = 42000}, 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 *)

Extensions

Offset corrected by N. J. A. Sloane, Jun 16 2021

A029740 Odd numbers with distinct digits.

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 103, 105, 107, 109, 123, 125, 127, 129, 135, 137, 139, 143, 145, 147, 149, 153, 157
Offset: 1

Views

Author

Keywords

Comments

The sequence has 4384045 terms. - Harvey P. Dale, Jan 12 2019
Maximum term is 9876543201. Next higher number with distinct digits is 9876543210. - Alonso del Arte, Jan 09 2020

Crossrefs

Cf. A029741 (even version). Union of that sequence with this sequence gives A010784.

Programs

  • Mathematica
    Select[Range[1, 199, 2], Max[DigitCount[#]] == 1 &] (* Harvey P. Dale, Jan 12 2019 *)
  • Python
    # generates full sequence
    from itertools import permutations
    afull = sorted(set(int("".join(p)) for d in range(1, 11) for p in permutations("0123456789", d) if p[0] != "0" and p[-1] in "13579"))
    print(afull[:100]) # Michael S. Branicky, Aug 04 2022
  • Scala
    def hasDistinctDigits(n: Int): Boolean = {
      val numerStr = n.toString
      val digitSet = numerStr.split("").toSet
      numerStr.length == digitSet.size
    }
    (1 to 199 by 2).filter(hasDistinctDigits) // Alonso del Arte, Jan 09 2020
    

Extensions

First comment corrected by Harvey P. Dale, Mar 04 2020 at the insistence of Sean A. Irvine
Offset changed to 1 by Michael S. Branicky, Aug 04 2022
Removed incorrect Sage program. - N. J. A. Sloane, Aug 04 2022
Previous Showing 31-40 of 85 results. Next