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

A068092 Index of smallest triangular number with n digits.

Original entry on oeis.org

1, 4, 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: 1

Views

Author

Amarnath Murthy, Feb 19 2002

Keywords

Comments

Look at the interleaving of the decimal expansion of the square roots of 2 and 20.

Examples

			a(4) = 45 as the 45th triangular number is 45*46/2 = 1035 while the 44th is 990.
		

Crossrefs

Programs

  • Magma
    [Round(Sqrt(2*10^(n-1))) : n in [1..30]]; // Vincenzo Librandi, Oct 05 2011
    
  • Mathematica
    f[n_] := Block[{a = Floor[Sqrt[2*10^n]]}, If[a(a + 1)/2 < 10^n, a++ ]; Return[a]]; Table[ f[n], {n, 0, 30} ]
  • PARI
    a(n) = round(sqrt(2*10^(n-1))) \\ Charles R Greathouse IV, Oct 04 2011
    
  • Python
    from math import isqrt
    def A068092(n): return isqrt(10**(n-1)<<3)+1>>1 # Chai Wah Wu, Oct 17 2022

Formula

a(n) = b where b = floor(sqrt(2*10^(n-1))) and if b(b+1)/2 < 10^(n-1), then b = b+1. [corrected by Ray Chandler, Oct 04 2011]
a(n) = round((2*10^(n-1))^(1/2)). - Vladeta Jovovic, Mar 08 2004
a(n) = A002024(10^(n-1)). - Michel Marcus, Jan 27 2022

Extensions

Edited and extended by Robert G. Wilson v, Feb 21 2002

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

A349875 Triangular numbers whose mean digit value reaches a new maximum.

Original entry on oeis.org

0, 1, 3, 6, 78, 686999778, 9876799878, 89996788896, 77779987999896, 589598998999878, 999699998689998991, 9988894989978899995, 95898999989999989765, 999999966989999986978996
Offset: 1

Views

Author

Jon E. Schoenfield, Dec 03 2021

Keywords

Comments

Subsequence of A068808.
No triangular number ends in 9, so the mean digit value is always less than 9.
Is this sequence finite? Or does the mean digit value approach some upper limit arbitrarily closely without ever reaching it exactly, and, if so, what is that limit?
a(14) <= 999999966989999986978996. - David A. Corneth, Dec 05 2021

Examples

			   n                  a(n)  digit sum  #dgts  mean digit value
  --  --------------------  ---------  -----  ----------------
   1                     0          0      1  0
   2                     1          1      1  1
   3                     3          3      1  3
   4                     6          6      1  6
   5                    78         15      2  7.5
   6             686999778         69      9  7.66666666666...
   7            9876799878         78     10  7.8
   8           89996788896         87     11  7.90909090909...
   9        77779987999896        111     14  7.92857142857...
  10       589598998999878        120     15  8
  11    999699998689998991        145     18  8.05555555555...
  12   9988894989978899995        154     19  8.10526315789...
  13  95898999989999989765        163     20  8.15
		

Crossrefs

Programs

  • Mathematica
    seq = {}; max = -1; Do[If[(m = Mean @ IntegerDigits[(t = n*(n + 1)/2)]) > max, max = m; AppendTo[seq, t]], {n, 0, 10^6}]; seq (* Amiram Eldar, Dec 03 2021 *)
  • Python
    def meandigval(n): s = str(n); return sum(map(int, s))/len(s)
    def afind(limit):
        alst, k, t, record = [], 0, 0, -1
        while t <= limit:
            mdv = meandigval(t)
            if mdv > record:
                print(t, end=", ")
                record = mdv
            k += 1
            t += k
    afind(10**14) # Michael S. Branicky, Dec 03 2021

Extensions

a(14) verified by Martin Ehrenstein, Dec 06 2021
Showing 1-7 of 7 results.