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.

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