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.

A062691 Triangular numbers that contain exactly 2 different digits.

Original entry on oeis.org

10, 15, 21, 28, 36, 45, 78, 91, 171, 300, 595, 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, 2222211111, 5000050000
Offset: 1

Views

Author

Erich Friedman, Jul 04 2001

Keywords

Comments

For n > 2, A309597(n) is a term. - Seiichi Manyama, Sep 15 2019
The other known infinite families of terms are A037156(n) for n > 1, A319170(n), and A383942(n). - David Radcliffe, Aug 25 2025

Examples

			300 is triangular and contains the digits 0 and 3.
		

Crossrefs

Cf. A000217, A045914 (all digits the same), A213516, A213518, A309597.

Programs

  • Mathematica
    Select[Accumulate[Range[14000]],Count[DigitCount[#],Except[0]]==2&] (* Harvey P. Dale, Nov 27 2011 *)
  • PARI
    for(k=0, 1e5, if(#Set(digits(j=k*(k+1)/2))==2, print1(j", "))) \\ Seiichi Manyama, Sep 15 2019

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

A325493 a(n) = Sum_{k=1..n} A325910(k) * 10^(2^(k-1)).

Original entry on oeis.org

0, 10, 1010, 11011010, 1111001011011010, 11111111000011011111001011011010, 1111111111111111000000001111001011111111000011011111001011011010
Offset: 0

Views

Author

Seiichi Manyama, Sep 14 2019

Keywords

Crossrefs

Programs

  • PARI
    {a(n) = sum(i=1, n, 10^2^(i-1)*((-1)^(i-1)*sum(j=0, i-1, (-1)^j*10^2^j)-(1-(-1)^i)/2)/9)}

A383942 a(n) = (8*10^(2n) - 10^(n+1) + 2) / 9.

Original entry on oeis.org

78, 8778, 887778, 88877778, 8888777778, 888887777778, 88888877777778, 8888888777777778, 888888887777777778, 88888888877777777778, 8888888888777777777778, 888888888887777777777778, 88888888888877777777777778, 8888888888888777777777777778
Offset: 1

Views

Author

David Radcliffe, Aug 18 2025

Keywords

Comments

This is one of four infinite families of triangular numbers consisting of two different digits. The other three families are A319170, A037156 (n>1), and A309597 (n>2).

Crossrefs

Programs

  • Mathematica
    A383942[n_] := (8*10^(2*n) - 10^(n+1) + 2)/9; Array[A383942, 15] (* or *)
    LinearRecurrence[{111, -1110, 1000}, {78, 8778, 887778}, 15] (* Paolo Xausa, Aug 27 2025 *)
  • Python
    def A383942(n): return (8*10**(2*n)-10**(n+1)+2)//9

Formula

a(n) = A000217(A073551(n+1)).
G.f.: 6*x*(13 + 20*x)/((1 - x)*(1 - 10*x)*(1 - 100*x)). - Stefano Spezia, Aug 19 2025
Showing 1-5 of 5 results.