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

A095864 Largest n-digit triangular number.

Original entry on oeis.org

6, 91, 990, 9870, 99681, 998991, 9997156, 99991011, 999961560, 9999878910, 99999957291, 999999911791, 9999997965180, 99999998250180, 999999997764120, 9999999895728690, 99999999552805215, 999999998765257141
Offset: 1

Views

Author

Ray Chandler, Jun 28 2004

Keywords

Comments

Triangular number with index given by A095863.

Crossrefs

Programs

  • Mathematica
    Join[{6},(#(#+1))/2&/@Table[Floor[(Sqrt[8*10^n+1]-1)/2],{n,2,30}]] (* Harvey P. Dale, Jul 27 2012 *)
    triInverse[n_] := Floor[(Sqrt[1 + 8*n] - 1)/2]; tri[n_] := n*(n+1)/2; Table[tri[triInverse[10^n - 1]], {n, 18}] (* T. D. Noe, Jul 27 2012 *)

Formula

a(n) = A068093(n+1) - A068092(n+1).

A095866 Largest n-digit number - largest n-digit triangular number.

Original entry on oeis.org

3, 8, 9, 129, 318, 1008, 2843, 8988, 38439, 121089, 42708, 88208, 2034819, 1749819, 2235879, 104271309, 447194784, 1234742858, 2234186964, 3266133123, 22172578524, 114481278033, 204796672749, 841526085621, 355055477499
Offset: 1

Views

Author

Ray Chandler, Jun 28 2004

Keywords

Crossrefs

Programs

  • Mathematica
    lndt[n_]:=Module[{c=Floor[(Sqrt[8*10^n+1]-1)/2]},(c(c+1))/2]; Join[{3}, Table[ 10^n-1-lndt[n],{n,2,30}]] (* Harvey P. Dale, May 16 2017 *)

Formula

a(n) = 10^n - 1 - A095864(n).

A068093 Smallest n-digit triangular number.

Original entry on oeis.org

1, 10, 105, 1035, 10011, 100128, 1000405, 10001628, 100005153, 1000006281, 10000020331, 100000404505, 1000001326005, 10000002437316, 100000012392316, 1000000042485480, 10000000037150046, 100000000000018810, 1000000000179470703, 10000000002237948990
Offset: 1

Views

Author

Amarnath Murthy, Feb 19 2002

Keywords

Crossrefs

Programs

  • Mathematica
    triInverse[n_] := Floor[(Sqrt[1 + 8*n] - 1)/2]; tri[n_] := n*(n+1)/2; Table[tri[1 + triInverse[10^(n-1) - 1]], {n, 20}] (* T. D. Noe, Jul 27 2012 *)

Formula

Triangular number with index given by A068092.

Extensions

More terms from Sascha Kurz, Mar 06 2002

A068094 Number of n-digit triangular numbers.

Original entry on oeis.org

3, 10, 31, 96, 306, 967, 3058, 9670, 30579, 96700, 305793, 967000, 3057922, 9670000, 30579224, 96699996, 305792239, 966999967, 3057922393, 9669999669, 30579223926, 96699996687, 305792239263, 966999966873, 3057922392627, 9669999668731, 30579223926265
Offset: 1

Views

Author

Amarnath Murthy, Feb 19 2002

Keywords

Crossrefs

Programs

  • Mathematica
    triInverse[n_] := Floor[(Sqrt[1 + 8*n] - 1)/2]; Differences[Table[triInverse[10^(n - 1) - 1], {n, 30}]] (* T. D. Noe, Jul 27 2012 *)

Formula

Differences of successive terms of A068092.

Extensions

More terms from Sascha Kurz, Mar 06 2002

A095863 Index of largest triangular number with n digits.

Original entry on oeis.org

3, 13, 44, 140, 446, 1413, 4471, 14141, 44720, 141420, 447213, 1414213, 4472135, 14142135, 44721359, 141421355, 447213594, 1414213561, 4472135954, 14142135623, 44721359549, 141421356236, 447213595499, 1414213562372
Offset: 1

Views

Author

Ray Chandler, Jun 28 2004

Keywords

Comments

Partial sums of A068094.

Crossrefs

Formula

a(n) = A068092(n+1) - 1.

A095865 Smallest n-digit triangular number - smallest n-digit number.

Original entry on oeis.org

0, 0, 5, 35, 11, 128, 405, 1628, 5153, 6281, 20331, 404505, 1326005, 2437316, 12392316, 42485480, 37150046, 18810, 179470703, 2237948990, 10876002500, 22548781025, 26940078203, 242416922750, 572687476751, 4117080477500
Offset: 1

Views

Author

Ray Chandler, Jun 28 2004

Keywords

Crossrefs

Formula

a(n) = A068093(n) - 10^(n-1).

A182402 Total number of digits in n-th row of a triangle formed by the positive integers.

Original entry on oeis.org

1, 2, 3, 5, 10, 12, 14, 16, 18, 20, 22, 24, 26, 34, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 171, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220, 224, 228, 232
Offset: 1

Views

Author

Dave Durgin, Jun 19 2012

Keywords

Comments

Sequence is nonlinear at each decade transition; for example, row-5 transitions from single-digit (7) to double-digit (10) where sequence jumps (3) to (5); row-14 transitions from 2-digit (92) to 3-digit (105) where sequence jumps from (26) to (34).
The rows of nonlinearity are given by A068092. - Jon Perry, May 26 2013

Examples

			1; .................... (row 1 contains 1 digit)
2,   3; ............... (row 2 contains 2 digits)
4,   5,  6; ........... (row 3 contains 3 digits)
7,   8,  9, 10; ....... (row 4 contains 5 digits)
11, 12, 13, 14, 15; ... (row 5 contains 10 digits)
		

Crossrefs

Cf. A055642, A226029 (first differences).
Cf. A068092.

Programs

  • Haskell
    a182402 n = a182402_list !! (n-1)
    a182402_list = map (sum . map a055642) $ t 1 [1..] where
       t i xs = ys : t (i + 1) zs where
         (ys, zs) = splitAt i xs
    -- Reinhard Zumkeller, May 26 2013
    
  • Mathematica
    f[n_] := Length@ Flatten[ IntegerDigits[ Range[n (n - 1)/2 + 1, n (n + 1)/2]]]; Array[f, 58] (* Robert G. Wilson v, Sep 04 2013 *)
  • PARI
    a(n) = {my(x=n*(n-1)/2+1, y=n*(n+1)/2, nx=#Str(x), ny=#Str(y), s=0); for (i=nx, ny, if (i==nx, if (i==ny, s+=(y+1-x)*i, s+=(10^i-x)*i), if (i==ny, s+=(y+1-10^(i-1))*i, s+=i*(10^(i+1)-10^i+1)););); s;} \\ Michel Marcus, Jan 26 2022
    
  • Python
    def a(n): return len("".join(str(i) for i in range(n*(n+1)//2+1, (n+1)*(n+2)//2+1)))
    print([a(n) for n in range(58)]) # Michael S. Branicky, Jan 26 2022

Formula

a(n) = A058183(A000217(n)) - A058183(A000217(n-1)), n >= 2. - Omar E. Pol, Jun 25 2012

Extensions

Better definition from Omar E. Pol, Jun 25 2012

A226030 Smallest m such that A226029(m) = n.

Original entry on oeis.org

1, 3, 15, 46, 4, 448, 1415, 13, 14143, 44722, 14, 447215, 45, 4472137, 14142137, 140, 141421357, 447213596, 1414213563, 4472135956, 14142135625, 44721359551, 141421356238, 447213595501, 1414213562374, 4472135955001, 14142135623732, 44721359549997, 141421356237311, 447213595499959
Offset: 1

Views

Author

Reinhard Zumkeller, May 26 2013

Keywords

Comments

a(39) = 44. - Michel Marcus, Jan 26 2022
Let k = ceiling(sqrt(2*10^m)). Then some terms are of the form k or k + 1. - David A. Corneth, Jan 27 2022

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a226030 = (+ 1) . fromJust . (`elemIndex` a226029_list)
    
  • PARI
    nb(n) = {my(x=n*(n-1)/2+1, y=n*(n+1)/2, nx=#Str(x), ny=#Str(y), s=0); for (i=nx, ny, if (i==nx, if (i==ny, s+=(y+1-x)*i, s+=(10^i-x)*i), if (i==ny, s+=(y+1-10^(i-1))*i, s+=i*(10^(i+1)-10^i+1)););); s;} \\ A182402
    a(n) = my(k=1, last=nb(k), new=nb(k+1)); while (new-last !=n, k++; last=new; new=nb(k+1)); k; \\ Michel Marcus, Jan 26 2022

Formula

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

Extensions

a(12)-a(18) from Michel Marcus, Jan 26 2022
More terms from David A. Corneth, Jan 26 2022

A077688 a(n) = sum of all cyclic permuted concatenations of the next n numbers.

Original entry on oeis.org

1, 55, 1665, 269884, 6565656565, 1121212121211, 176767676767675, 26262626262626260, 3727272727272727269, 510101010101010101005, 67777777777777777777771, 8787878787878787878787870, 1116161616161616161616161605
Offset: 1

Views

Author

Amarnath Murthy, Nov 16 2002

Keywords

Examples

			a(2) = 23 + 32, a(4) = 78910 + 89107 + 91078 + 10789 = 269884 = sum of concatenation of numbers in each group: (7,8,9,10), (8,9,10,7), (9,10,7,8), (10,7,8,9).
		

Crossrefs

Programs

  • PARI
    { len10(n) = ceil(log(n+1)/log(10)) } { A077688(n) = local(m,w,s); m=0; for(k=1+(n*(n-1))/2,(n*(n+1))/2, m=m*10^len10(k)+k ); w=10^len10(m); s=0; for(k=1+(n*(n-1))/2,(n*(n+1))/2, m=(m*10^len10(k)+k)%w; s+=m ); return(s); } \ for n not in A068092 { a(n) = local(l); l=len10(n^2/2); return((n^2+1)*n*(10^(l*n)-1)/(10^l-1)/2) } \\ Max Alekseyev, Feb 11 2005

Formula

For n not in A068092 (implying that all n numbers in the concatenation have the same length L), a(n) = ((n^2+1)*n)/2 * (10^(L*n)-1)/(10^L-1), where L = ceiling(log(n^2/2)/log(10)). - Max Alekseyev, Feb 11 2005

Extensions

More terms from Max Alekseyev, Feb 11 2005

A236043 Number of triangular numbers <= 10^n.

Original entry on oeis.org

2, 5, 14, 45, 141, 447, 1414, 4472, 14142, 44721, 141421, 447214, 1414214, 4472136, 14142136, 44721360, 141421356, 447213595, 1414213562, 4472135955, 14142135624, 44721359550, 141421356237, 447213595500, 1414213562373, 4472135955000, 14142135623731
Offset: 0

Views

Author

Derek Orr, Jan 18 2014

Keywords

Comments

Except for 5, all numbers begin with either a 4 or a 1. If strictly less than, the 5 would become a 4, satisfying this conjecture.
This is not a conjecture, it is a fact and it is the result from the square root of 2 and 20 times powers of ten. - Robert G. Wilson v, Jan 11 2015
Tanton (2012) discusses the equivalent sequence based on excluding zero from the triangular numbers, and presents the relevant formula, which, being asymptotic to floor[sqrt(2*10^n)], explains the observation in the first comment. - Chris Boyd, Jan 19 2014

Examples

			There are 4472 triangular numbers less than or equal to 10^7 so a(7) = 4472.
		

Crossrefs

Cf. A000217, A002024, A003056. Essentially the same as A068092.

Programs

  • Magma
    [Floor(Sqrt(2*10^n+1/4) + 1/2): n in [1..30]]; // Vincenzo Librandi, Feb 08 2014
    
  • Maple
    seq(floor(sqrt(2*10^n+1/4)+1/2),n=1..30); # Robert Israel, Dec 22 2024
  • Mathematica
    Table[ Floor[ Sqrt[2*10^n + 1] + 1/2], {n, 25}] (* Vincenzo Librandi, Feb 08 2014; modified by Robert G. Wilson v, Jan 11 2015 *)
  • PARI
    a236043(n)=floor(sqrt(2*10^n+1/4)+1/2) \\ Chris Boyd, Jan 19 2014
    
  • Python
    from math import isqrt
    def A236043(n): return isqrt(10**n+1<<3)+1>>1 # Chai Wah Wu, Jun 14 2025

Formula

a(n) = floor( sqrt(2*10^n + 1/4) + 1/2 ), adapted from Tanton (see Links section). - Chris Boyd, Jan 19 2014
a(n) = A068092(n + 1) for n >= 2. - R. J. Mathar, Jan 20 2014
a(n) = A003056(10^n) + 1 = A002024(10^n + 1). - Andrew Howroyd, Dec 21 2024

Extensions

More terms from Jon E. Schoenfield, Feb 07 2014
a(0) prepended by Andrew Howroyd, Dec 21 2024
Showing 1-10 of 11 results. Next