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

A043537 Number of distinct base-10 digits of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2
Offset: 1

Views

Author

Keywords

Comments

a(A000079(A130694(n))) = 10. - Reinhard Zumkeller, Jul 29 2007
a(A000290(A016070(n))) = 2. - Reinhard Zumkeller, Aug 05 2010
a(n) = 10 for almost all n. - Charles R Greathouse IV, Oct 02 2013

Crossrefs

Programs

A045914 Triangular numbers with all digits the same.

Original entry on oeis.org

0, 1, 3, 6, 55, 66, 666
Offset: 1

Views

Author

Keywords

Comments

Escott (1905) proved that there are no more terms with fewer than 30 digits. The complete proof that there are no more terms was given by Ballew and Weger (1972). - Amiram Eldar, Jan 22 2022
Hercher and Fegert pointed out that the proof by Ballew and Weger was flawed, and provided an alternative proof (2025). - Seiichi Azuma, Mar 25 2025

References

  • L. E. Dickson, History of the Theory of Numbers, Vol. II, p. 33, Chelsea NY, 1952.
  • E. B. Escott, Math. Quest. Educational Times, New Series, Vol. 8 (1905), pp. 33-34. - N. J. A. Sloane, Mar 31 2014

Crossrefs

Cf. A213516 (triangular numbers having only 1 or 2 different digits).
Cf. A118668.

Programs

  • Mathematica
    Select[Union[Flatten[Table[FromDigits[PadRight[{},n,k]],{n,3},{k,0,9}]]],OddQ[ Sqrt[8#+1]]&] (* Harvey P. Dale, Feb 11 2020 *)

Formula

A118668(a(n)) = 1. - Reinhard Zumkeller, Jul 11 2015

Extensions

0 inserted by T. D. Noe, Jun 22 2012

A213517 Numbers n such that the triangular number n*(n+1)/2 has only 1 or 2 different digits in base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 18, 24, 34, 36, 44, 58, 66, 77, 100, 101, 105, 109, 114, 132, 141, 363, 666, 714, 816, 1000, 1095, 1287, 1332, 1541, 3363, 6666, 10000, 10114, 13332, 66666, 100000, 133332, 666666, 1000000, 1333332, 6666666, 10000000
Offset: 1

Views

Author

T. D. Noe, Jun 21 2012

Keywords

Comments

The list of triangular numbers containing only one digit (A045914) is finite. This list is infinite because numbers like 133332, 666666, and 1000000 occur an infinite number of times.
A118668(a(n)) <= 2. - Reinhard Zumkeller, Jul 11 2015
A325907(n) is a term. - Seiichi Manyama, Sep 14 2019

Crossrefs

Programs

  • Haskell
    a213517 n = a213517_list !! (n-1)
    a213517_list = filter ((<= 2) . a118668) [0..]
    -- Reinhard Zumkeller, Jul 11 2015
    
  • Mathematica
    t = {}; Do[tri = n*(n+1)/2; If[Length[Union[IntegerDigits[tri]]] <= 2, AppendTo[t, n]], {n, 0, 10^5}]; t
  • PARI
    for(k=0, 1e8, if(#Set(digits(k*(k+1)/2))<=2, print1(k", "))) \\ Seiichi Manyama, Sep 15 2019

A213518 Numbers k such that the triangular number k*(k+1)/2 has 2 different digits in base 10.

Original entry on oeis.org

4, 5, 6, 7, 8, 9, 12, 13, 18, 24, 34, 44, 58, 66, 77, 100, 101, 105, 109, 114, 132, 141, 363, 666, 714, 816, 1000, 1095, 1287, 1332, 1541, 3363, 6666, 10000, 10114, 13332, 66666, 100000, 133332, 666666, 1000000, 1333332, 6666666, 10000000, 13333332, 33336636, 66666666, 100000000
Offset: 1

Views

Author

T. D. Noe, Jun 22 2012

Keywords

Comments

The list of triangular numbers containing only one digit (A045914) is finite. This list is infinite because numbers like 133332, 666666, and 1000000 occur an infinite number of times.
A118668(a(n)) = 2. - Reinhard Zumkeller, Jul 11 2015
For n > 2, A325907(n) is a term. - Seiichi Manyama, Sep 15 2019

Crossrefs

Cf. A062691 (the corresponding triangular numbers), A213516, A213517, A325907.
Cf. A118668.
Cf. A187127.

Programs

  • Haskell
    a213518 n = a213518_list !! (n-1)
    a213518_list = filter ((== 2) . a118668) [0..]
    -- Reinhard Zumkeller, Jul 11 2015
    
  • Mathematica
    t = {}; Do[tri = n*(n+1)/2; If[Length[Union[IntegerDigits[tri]]] == 2, AppendTo[t, n]], {n, 10^5}]; t
  • PARI
    for(k=0, 1e8, if(#Set(digits(k*(k+1)/2))==2, print1(k", "))) \\ Seiichi Manyama, Sep 15 2019

Extensions

a(45)-a(48) from Seiichi Manyama, Sep 15 2019

A255678 Smallest number m needing exactly n distinct digits in decimal representation of m*(m+1)/2.

Original entry on oeis.org

0, 4, 14, 45, 143, 452, 1431, 4549, 14334, 46097
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 11 2015

Keywords

Comments

A118668(a(n)) = n and A118668(m) <> n for m < a(n).

Crossrefs

Cf. A118668, A260214 (the resulting triangular numbers).

Programs

  • Haskell
    a255678 n = head $ filter ((== n) . a118668) [0..]

A115939 Numbers k such that the k-th triangular number contains each of the 10 decimal digits exactly once.

Original entry on oeis.org

46097, 49796, 50139, 55151, 55484, 56520, 58050, 62495, 62567, 62900, 66294, 68805, 69542, 70766, 72594, 73737, 73971, 74168, 74357, 75555, 76364, 77805, 78686, 78848, 84555, 85959, 86076, 87263, 87669, 88406, 89883, 90287, 90297
Offset: 1

Views

Author

Giovanni Resta, Feb 06 2006

Keywords

Comments

There are 82 such numbers, the largest being 138959.
A118668(a(n)) = 10. - Reinhard Zumkeller, Jul 11 2015

Examples

			T(75555) = 2854316790.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[141000], Sort[IntegerDigits[# (# + 1)/2]] == Range[0, 9] &] (* Giovanni Resta, Mar 19 2013 *)
    (Sqrt[8#+1]-1)/2&/@Select[FromDigits/@Select[Permutations[Range[0,9]], #[[1]]>0&],OddQ[Sqrt[8#+1]]&] (* Harvey P. Dale, Sep 19 2016 *)

A260214 a(n) is the first triangular number whose decimal representation uses n distinct digits.

Original entry on oeis.org

0, 10, 105, 1035, 10296, 102378, 1024596, 10348975, 102738945, 1062489753
Offset: 1

Views

Author

Anders Hellström, Jul 19 2015

Keywords

Crossrefs

Programs

  • Mathematica
    # (# + 1)/2 & /@ {0, 4, 14, 45, 143, 452, 1431, 4549, 14334, 46097} (* terms in A255678 *) (* Robert G. Wilson v, Jul 21 2015 *)
  • PARI
    number_of_distinct_digits(m) = if(m==0,1,#vecsort(digits(m), , 8))
    a(n)=my(m=0); while(!(number_of_distinct_digits(m*(m+1)/2)==n), m++); m*(m+1)/2;
    first(m)=vector(m, n, a(n)) \\m<=10 /* Anders Hellström, Aug 03 2015 */

Formula

a(n) = A255678(n)*(A255678(n)+1)/2.

A352057 Triangular numbers whose nonzero digits are all the same.

Original entry on oeis.org

0, 1, 3, 6, 10, 55, 66, 300, 666, 990, 3003, 5050, 10011, 66066, 500500, 600060, 50005000, 5000050000, 500000500000, 50000005000000, 5000000050000000, 500000000500000000, 50000000005000000000, 5000000000050000000000, 500000000000500000000000, 50000000000005000000000000
Offset: 1

Views

Author

Steven Lu, Mar 02 2022

Keywords

Comments

This sequence may correspond to "monochromatic step squads" in the British animation "Numberblocks".
Conjecture: the largest term in this sequence whose nonzero digits are not 5 is 600060.

Crossrefs

Supersequence of A037156.
Cf. A352148 (indices of these triangular numbers).

Programs

  • Mathematica
    (* Method1 *)
    NonZeroQ[n_Integer] := n != 0; Select[
    Table[n (n + 1)/2, {n, 0, 1000000}],
    Length[Tally[Select[IntegerDigits[#], NonZeroQ]]] == 1 &]
    (* Method2 *)
    Sort[Select[
      Flatten[Outer[Times,
        Table[FromDigits[IntegerDigits[n, 2]], {n, 2^16 - 1}], Range[9]]],
       IntegerQ[Sqrt[8 # + 1]] &]]
  • PARI
    isok(k) = my(d=digits(k*(k+1)/2)); d = select(x->(x!=0), d); #Set(d)<=1;
    lista(nn) = {for (n=0, nn, if (isok(n), print1(n*(n+1)/2, ", ")););} \\ Michel Marcus, Mar 02 2022
  • Python
    from sympy import integer_nthroot
    from sympy.utilities.iterables import multiset_permutations
    def istri(n): return integer_nthroot(8*n+1, 2)[1]
    def zplus1(digits):
        if digits == 1: yield 0
        for d1 in "123456789":
            digset = "0"*(digits-1) + d1*(digits-1)
            for mp in multiset_permutations(digset, digits-1):
                t = int(d1 + "".join(mp))
                yield t
    def afind(maxdigits):
        for digits in range(1, maxdigits+1):
            for t in zplus1(digits):
                if istri(t):
                    print(t, end=", ")
    afind(22) # Michael S. Branicky, Mar 02 2022
    

Extensions

a(24)-a(25) from Michael S. Branicky, Mar 02 2022
Showing 1-8 of 8 results.