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 11-20 of 58 results. Next

A118668 Number of distinct digits needed to write the n-th triangular number in decimal representation.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 1, 3, 3, 3, 3, 3, 3, 3, 2, 4, 3, 3, 3, 3, 4, 4, 4, 3, 4, 4, 4, 4, 2, 3, 4, 3, 4, 4, 3, 4, 2, 3, 4, 4, 4, 3, 3, 4, 3, 4, 3, 2, 4, 4, 4, 3, 3, 4, 4, 3, 4, 3, 4, 3, 4, 4, 4, 4, 3, 4, 3, 4, 4, 4, 2, 2, 3, 3, 4
Offset: 0

Views

Author

Reinhard Zumkeller, May 19 2006

Keywords

Comments

0 < a(n) <= 10;
a(n) = A043537(A000217(n)).

Examples

			n=99: 99*(99+1)/2 = 4950 -> a(99) = #{0,4,5,9} = 4;
see A119033 for an overview of sequences with terms composed of not more than 3 distinct digits.
n=100: 100*(100+1)/2 = 5050 -> a(100) = #{0,5} = 2;
		

Crossrefs

Programs

  • Haskell
    a118668 = a043537 . a000217
    a118668_list = map a043537 a000217_list
    -- Reinhard Zumkeller, Jul 11 2015
  • Mathematica
    Length[Union[IntegerDigits[#]]]&/@Accumulate[Range[0,110]] (* Harvey P. Dale, Jul 23 2012 *)

A076493 Number of common (distinct) decimal digits of n and n^2.

Original entry on oeis.org

1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 2, 1, 2, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 2, 1, 1, 0, 0, 1, 1, 0, 0, 0, 2, 1, 0, 2, 2, 1, 1, 0, 1, 1, 1, 1, 0, 1, 2, 1, 2, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 3, 2, 1, 1, 1
Offset: 0

Views

Author

Labos Elemer, Oct 21 2002

Keywords

Comments

a(A029783(n)) = 0, a(A189056(n)) > 0; 0 <= a(n) <= 10, see example for first occurrences. [Reinhard Zumkeller, Apr 16 2011]

Examples

			a(2) = #{} = 0: 2^2 = 4;
a(0) = #{0} = 1: 0^2 = 0;
a(10) = #{0,1} = 2: 10^2 = 100;
a(105) = #{0,1,5} = 3: 105^2 = 11025;
a(1025) = #{0,1,2,5} = 4: 1025^2 = 1050625;
a(10245) = #{0,1,2,4,5} = 5: 10245^2 = 104960025;
a(102384) = #{0,1,2,3,4,8} = 6: 102384^2 = 10482483456;
a(1023456789) = #{0 .. 9} = 10: 1023456789^2 = 1047463798950190521.
		

Crossrefs

Programs

  • Haskell
    import Data.List (intersect, nub)
    import Data.Function (on)
    a076493 n = length $ (intersect `on` nub . show) n (n^2)
    -- Reinhard Zumkeller, Apr 16 2011
  • Mathematica
    Table[Length[Intersection[IntegerDigits[n], IntegerDigits[n^2]]], {n, 1, 100}]

Extensions

Initial 1 added and offset adjusted by Reinhard Zumkeller, Apr 16 2011

A101594 Numbers with exactly two distinct decimal digits, neither of which is 0.

Original entry on oeis.org

12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28, 29, 31, 32, 34, 35, 36, 37, 38, 39, 41, 42, 43, 45, 46, 47, 48, 49, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 69, 71, 72, 73, 74, 75, 76, 78, 79, 81, 82, 83, 84, 85, 86, 87, 89, 91, 92, 93, 94, 95, 96, 97, 98, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 131
Offset: 1

Views

Author

David Wasserman, Dec 07 2004

Keywords

Comments

First differs from A125290 at a(83) = 131 != 123 = A101594(83). - Michael S. Branicky, Dec 13 2021

Crossrefs

Programs

  • Haskell
    a101594 n = a101594_list !! (n-1)
    a101594_list = filter ((== 2) . a043537) a052382_list
    -- Reinhard Zumkeller, Jun 18 2013
    
  • Mathematica
    Select[Range[200], FreeQ[#, 0] && Length[Union[#]] == 2 & [IntegerDigits[#]] &] (* Paolo Xausa, May 06 2024 *)
  • Python
    def ok(n): s = set(str(n)); return len(s) == 2 and "0" not in s
    print([k for k in range(132) if ok(k)]) # Michael S. Branicky, Dec 13 2021

Formula

A168046(a(n)) * A043537(A004719(a(n))) = 2. - Reinhard Zumkeller, Jun 18 2013

A125289 Numbers with unique nonzero digit in decimal representation.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 22, 30, 33, 40, 44, 50, 55, 60, 66, 70, 77, 80, 88, 90, 99, 100, 101, 110, 111, 200, 202, 220, 222, 300, 303, 330, 333, 400, 404, 440, 444, 500, 505, 550, 555, 600, 606, 660, 666, 700, 707, 770, 777, 800, 808, 880, 888, 900, 909
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 26 2006

Keywords

Comments

A043537(a(n)) <= 2.
A043537(A004719(a(n))) = 1: A004719(a(n)) is a repdigit number, see A010785;
also numbers having exactly one partition into digit values of their decimal representations: A061827(a(n))=1.

Crossrefs

Cf. A125292.

Programs

  • PARI
    is(n, base=10) = #Set(select(sign, digits(n, base)))==1 \\ Rémy Sigrist, Mar 28 2020
    
  • PARI
    a(n,base=10) = { for (w=0, oo, if (n<=(base-1)*2^w, my (d=1+(n-1)\2^w, k=2^w+(n-1)%(2^w)); return (d*fromdigits(binary(k), base)), n -= (base-1)*2^w)) } \\ Rémy Sigrist, Mar 28 2020
  • Python
    A125289_list = [n for n in range(10**4) if len(set(str(n))-{'0'})==1]
    # Chai Wah Wu, Jan 04 2015
    
  • Python
    from itertools import count, product, islice
    def A125289_gen(): # generator of terms
        yield from (int(d+''.join(m)) for l in count(0) for d in '123456789' for m in product('0'+d,repeat=l))
    A125289_list = list(islice(A125289_gen(),20)) # Chai Wah Wu, Mar 14 2025
    

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

A038378 Integers which have more distinct digits than any smaller number.

Original entry on oeis.org

0, 10, 102, 1023, 10234, 102345, 1023456, 10234567, 102345678, 1023456789
Offset: 1

Views

Author

Keywords

Comments

Or: Smallest number with exactly n distinct digits. - M. F. Hasler, May 04 2017

Crossrefs

Programs

  • Mathematica
    Prepend[NestList[FromDigits[Append[IntegerDigits[#],Last[Union[IntegerDigits[#]]]+1]]&,10,8],0] (* Ivan N. Ianakiev, May 10 2015 *)
    Join[{0},Table[FromDigits[PadRight[{1,0},n,{1,0,2,3,4,5,6,7,8,9}]],{n,2,10}]] (* Harvey P. Dale, Sep 27 2016 *)
  • PARI
    A038378(n)=sum(i=1,n--,10^(n-i)*if(i>1,i,10)) \\ M. F. Hasler, May 04 2017

Extensions

Offset fixed by Reinhard Zumkeller, Aug 25 2009

A137214 a(n) is the number of distinct decimal digits in 2^n.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 3, 5, 4, 4, 7, 6, 5, 4, 4, 4, 6, 6, 6, 9, 7, 7, 5, 6, 6, 7, 7, 8, 7, 7, 7, 6, 8, 7, 9, 8, 7, 8, 9, 7, 8, 9, 8, 7, 7, 8, 8, 7, 9, 8, 9, 9, 9, 9, 9, 9, 8, 9, 10, 9, 10, 7, 9, 8, 9, 9, 9, 8, 9, 10, 9, 9, 10, 9, 10, 9, 9, 10, 10, 10, 9, 8, 9, 9, 10, 10, 10, 10, 10
Offset: 0

Views

Author

Ctibor O. Zizka, Mar 06 2008

Keywords

Comments

Appears to be all 10's starting at a(169). - T. D. Noe, Apr 01 2014

Examples

			a(16) = 3 because 2^16 = 65536, which contains 3 distinct decimal digits [3,5,6].
		

Crossrefs

Programs

  • Maple
    A043537 := proc(n) nops(convert(convert(n,base,10),set)) ; end: A137214 := proc(n) A043537(2^n) ; end: seq(A137214(n),n=0..120) ; # R. J. Mathar, Mar 16 2008
    a:=proc(n) options operator, arrow: nops(convert(convert(2^n,base,10),set)) end proc: seq(a(n),n=0..80); # Emeric Deutsch, Apr 02 2008
  • Mathematica
    Table[Length[Union[IntegerDigits[2^n]]], {n, 0, 100}] (* T. D. Noe, Apr 01 2014 *)
  • Python
    def a(n): return len(set(str(2**n)))
    print([a(n) for n in range(99)]) # Michael S. Branicky, Jul 23 2021

Formula

a(n) = A043537(2^n). - R. J. Mathar, Mar 16 2008

Extensions

More terms from R. J. Mathar and Emeric Deutsch, Mar 16 2008

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
Previous Showing 11-20 of 58 results. Next