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

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 *)

A213516 Triangular numbers having only 1 or 2 different digits in base 10.

Original entry on oeis.org

0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 171, 300, 595, 666, 990, 1711, 2211, 3003, 5050, 5151, 5565, 5995, 6555, 8778, 10011, 66066, 222111, 255255, 333336, 500500, 600060, 828828, 887778, 1188111, 5656566, 22221111, 50005000, 51151555, 88877778
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 8888777778, 222222111111, and 500000500000 occur an infinite number of times.
A309597 is a subsequence. - Seiichi Manyama, Sep 14 2019

Crossrefs

Cf. A119033 (has list of sequences related to digits in triangular numbers).

Programs

  • Magma
    [n*(n+1)/2: n in [0..10^5] | #Set(Intseq(n*(n+1) div 2)) le 2]; // Bruno Berselli, Oct 27 2012
  • Mathematica
    t = {}; Do[tri = n*(n+1)/2; If[Length[Union[IntegerDigits[tri]]] <= 2, AppendTo[t, tri]], {n, 0, 10^5}]; t
    Select[Accumulate[Range[0,20000]],Count[DigitCount[#],0]>7&] (* Harvey P. Dale, Sep 03 2020 *)

A325907 a(n) = ( (-1)^n * Sum_{k=0..n-2} (-1)^k*10^(2^k) + 10^(2^(n-1)) - ((-1)^n+3)/2 )/3.

Original entry on oeis.org

3, 36, 3363, 33336636, 3333333366663363, 33333333333333336666666633336636, 3333333333333333333333333333333366666666666666663333333366663363
Offset: 1

Views

Author

Seiichi Manyama, Sep 08 2019

Keywords

Comments

All terms are elements of A213517.

Examples

			              36 =        -3 - 1 +        4 * 10^1.
            3363 =       -36 - 1 +       34 * 10^2.
        33336636 =     -3363 - 1 +     3334 * 10^4.
3333333366663363 = -33336636 - 1 + 33333334 * 10^8.
------------------------------------------------------
T(n) = n*(n+1)/2.
               T(3) =                               6.
              T(36) =                             666.
            T(3363) =                         5656566.
        T(33336636) =                 555665666566566.
T(3333333366663363) = 5555555666655656666556566566566.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := ((-1)^n * Sum[(-1)^k * 10^(2^k), {k, 0, n - 2}] + 10^(2^(n - 1)) - ((-1)^n + 3)/2)/3; Array[a, 7] (* Amiram Eldar, May 07 2021 *)
  • PARI
    {a(n) = ((-1)^n*sum(k=0, n-2, (-1)^k*10^2^k)+10^2^(n-1)-((-1)^n+3)/2)/3}

Formula

a(n) = 3 * A325906(n).
a(n) = -a(n-1) - 1 + A093137(2^(n-2)) * 10^(2^(n-2)).

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

A322570 Positive integers k such that A270710(k) (= (k+1)*(3*k-1)) have only 1 or 2 different digits in base 10.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 12, 16, 17, 33, 34, 48, 54, 285, 333, 334, 365, 385, 430, 471, 516, 816, 1049, 3333, 3334, 33333, 33334, 333333, 333334, 483048, 3333333, 3333334, 33333333, 33333334, 333333333, 333333334, 3333333333, 3333333334, 33333333333, 33333333334
Offset: 1

Views

Author

Seiichi Manyama, Aug 29 2019

Keywords

Crossrefs

Cf. A002277, A016069, A093137, A213517 (in case of triangular numbers), A270710, A322571.

Programs

  • Magma
    [k:k in [1..10000000]| #Set(Intseq((k+1)*(3*k-1))) le 2]; // Marius A. Burtea, Aug 29 2019
  • Mathematica
    Select[Range@ 50000, Length@ Union@ IntegerDigits[3 #^2 + 2 # - 1] <= 2 &] (* Giovanni Resta, Sep 04 2019 *)
  • PARI
    for(k=1, 1e8, if(#Set(digits(3*k^2+2*k-1))<=2, print1(k", ")))
    

Formula

For k > 0, A002277(k) is a term.
For k >= 0, A002277(k) + 1 (= A093137(k)) is a term.

Extensions

a(35)-a(36) from Jinyuan Wang, Aug 30 2019
a(37)-a(40) from Giovanni Resta, Sep 04 2019
Showing 1-5 of 5 results.