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.

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

A038544 a(n) = Sum_{i=0..10^n} i^3.

Original entry on oeis.org

1, 3025, 25502500, 250500250000, 2500500025000000, 25000500002500000000, 250000500000250000000000, 2500000500000025000000000000, 25000000500000002500000000000000, 250000000500000000250000000000000000, 2500000000500000000025000000000000000000
Offset: 0

Views

Author

Keywords

Comments

These terms k = x.y satisfy Diophantine equation x.y = (x+y)^2, when x and y have the same number of digits, "." means concatenation, and y may not begin with 0. So, this is a subsequence of A350870 and A238237. - Bernard Schott, Jan 20 2022

Examples

			a(1) = Sum_{i=0..10} i^3 = (Sum_{i=0..10} i)^2 = 3025.
		

Crossrefs

Programs

  • PARI
    sumcu(n) = for(x=0,n,y=10^x;z=y^2*(y+1)^2/4;(print1(z","))) \\ Cino Hilliard, Jun 18 2007

Formula

a(n) = (10^n+1)^2 * 10^(2*n) / 4.
From Bernard Schott, Jan 20 2022: (Start)
a(n) = A037156(n)^2.
a(n) = A350869(n) + 10^(3*n). (End)

Extensions

Edited by N. J. A. Sloane, Jul 02 2008 at the suggestion of R. J. Mathar

A076713 Harshad (Niven) triangular numbers: triangular numbers which are divisible by the sum of their digits.

Original entry on oeis.org

1, 3, 6, 10, 21, 36, 45, 120, 153, 171, 190, 210, 300, 351, 378, 465, 630, 666, 780, 820, 990, 1035, 1128, 1275, 1431, 1540, 1596, 1770, 2016, 2080, 2556, 2628, 2850, 2926, 3160, 3240, 3321, 3486, 3570, 4005, 4465, 4560, 4950, 5050, 5460, 5565, 5778, 5886
Offset: 1

Views

Author

Shyam Sunder Gupta, Oct 26 2002

Keywords

Comments

Intersection of A000217 and A005349. - K. D. Bajpai, Aug 13 2014

Examples

			a(5)=21: 21 is a triangular number and also a Harshad number as 21 is divisible by 2+1=3. So 21 is Harshad triangular number.
		

Crossrefs

Cf. A000217, A005349. Includes A037156(n) for n >= 2. Includes A068127.

Programs

  • Mathematica
    TriangularNumberQ[k_] := If[IntegerQ[1/2 (Sqrt[1 + 8 k] - 1)], True, False]; Harshad[k_] := Select[Range[k], IntegerQ[ #/(Plus @@ IntegerDigits[ # ])] &]; TriangularHarshad[k_] := Select[Harshad[k], TriangularNumberQ[#] &]; TriangularHarshad[5886] (* Ant King, Dec 13 2010 *)
    A076713 = {}; Do[k = n*(n + 1)*1/2; If[IntegerQ[k/(Plus @@ IntegerDigits[k])], AppendTo[A076713, k]], {n,1000}]; A076713  (* K. D. Bajpai, Aug 13 2014 *)

A350869 a(n) = Sum_{i=0..10^n-1} i^3.

Original entry on oeis.org

0, 2025, 24502500, 249500250000, 2499500025000000, 24999500002500000000, 249999500000250000000000, 2499999500000025000000000000, 24999999500000002500000000000000, 249999999500000000250000000000000000, 2499999999500000000025000000000000000000
Offset: 0

Views

Author

Bernard Schott, Jan 20 2022

Keywords

Comments

These terms k = x.y satisfy equation x.y = (x+y)^2, when x and y have the same number of digits, "." means concatenation, and y may not begin with 0. So, this is a subsequence of A350870 and A238237.

Examples

			a(1) = Sum_{i=0..9} i^3 = (Sum_{i=0..9} i)^2 = 2025.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (10^n*(10^n - 1)/2)^2; Array[a, 11, 0] (* Amiram Eldar, Jan 20 2022 *)
  • PARI
    a(n) = my(x=10^n-1); (x*(x+1)/2)^2; \\ Michel Marcus, Jan 22 2022

Formula

a(n) = 10^(2n) * (10^n-1)^2 / 4 = A037182(n)^2.
a(n) = A000217(10^n-1)^2.
a(n) = A038544(n) - 10^(3*n).

A067520 Triangular numbers whose index is a multiple of the sum of their digits.

Original entry on oeis.org

1, 10, 21, 45, 55, 120, 171, 300, 465, 666, 820, 1035, 1485, 1830, 2016, 2211, 2628, 2850, 2926, 3321, 4095, 5050, 5565, 5886, 7260, 8001, 8911, 10011, 10440, 13203, 14196, 16290, 17955, 18145, 18528, 19701, 20910, 22155, 23436, 24310, 29646
Offset: 1

Views

Author

Amarnath Murthy, Feb 14 2002

Keywords

Examples

			T(30) = 465 and 30 = 2*(4+6+5).
		

Crossrefs

Includes A037156.

Programs

  • Maple
    f:= proc(n) local t;
       t:= n*(n+1)/2;
       if n mod convert(convert(t,base,10),`+`) = 0 then return t fi
    end proc:
    map(f, [$1..300]); # Robert Israel, Jan 18 2024
  • Mathematica
    PolygonalNumber[Select[Range[300], Divisible[#, Total[IntegerDigits[# (# + 1) / 2]]]&]] (* Paolo Xausa, Jan 18 2024 *)

Extensions

More terms from Sascha Kurz, Mar 18 2002
Offset corrected by Sean A. Irvine, Dec 17 2023

A293686 8-digit numbers (padded with leading zeros where necessary) in which the sum of the number consisting of the first four digits and the number consisting of the last four digits equals the number consisting of the middle four digits.

Original entry on oeis.org

0, 10099, 10100, 20199, 20200, 30299, 30300, 40399, 40400, 50499, 50500, 60599, 60600, 70699, 70700, 80799, 80800, 90899, 90900, 100999, 101000, 111099, 111100, 121199, 121200, 131299, 131300, 141399, 141400, 151499, 151500, 161599, 161600, 171699, 171700
Offset: 1

Views

Author

Harvey P. Dale, Oct 14 2017

Keywords

Comments

Zero can be a leading digit.
The sequence is the 8-digit analog to A263194.
This sequence contains 5050 terms. - David A. Corneth, Oct 14 2017

Examples

			131299 is a term because 0013 + 1299 = 1312 and 1312 is the string of the middle four digits of 00131299.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..2*10^5] | (n div 10000+n) mod 10000 eq (n div 100) mod 10000]; // Vincenzo Librandi, Oct 15 2017
    
  • Mathematica
    dn8Q[n_]:=Module[{d=PadLeft[IntegerDigits[n],8,0]},FromDigits[ d[[1;;4]]]+ FromDigits[ d[[5;;8]]]==FromDigits[d[[3;;6]]]]; Select[Range[ 0,10^6], dn8Q]
  • PARI
    is(n) = n < 10^8 && n\10000 + n%10000 == (n \ 100) % 10000 \\ David A. Corneth, Oct 14 2017
    
  • PARI
    seq() = {my(t = 0, res = List(), c1, c2); while(t < 10^8, listput(res, t); c2 = (t\10000)%100; if(c2 < 99, t+= 10100, c1 = t\10^6; t = (c1+1)*10^6 + (c1 + 2)*10^4 + 98 - c1)); for(i=2, #res, if(res[i] > 10^6, listsort(res); return(res)); listput(res, res[i]-1))} \\ (this program produces the full sequence) David A. Corneth, Oct 16 2017

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

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.