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.

A061432 a(n) = smallest n-digit square.

Original entry on oeis.org

1, 16, 100, 1024, 10000, 100489, 1000000, 10004569, 100000000, 1000014129, 10000000000, 100000147984, 1000000000000, 10000002149284, 100000000000000, 1000000025191729, 10000000000000000, 100000000621806289, 1000000000000000000, 10000000005259630921
Offset: 1

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Examples

			a(4) = 1024 = 32^2 has 4 digits while 31^2 = 961 has 3 digits.
		

Crossrefs

Cf. A065736.

Programs

  • Magma
    [Ceiling(Sqrt(10^n))^2: n in [0..20]]; // G. C. Greubel, Mar 08 2019
    
  • Maple
    A061432 := n->ceil(10^((n-1)/2))^2;
  • Mathematica
    Table[Ceiling[Sqrt[10^n]]^2,{n,0,20}] (* Harvey P. Dale, Dec 29 2015 *)
  • PARI
    {a(n) = ceil(sqrt(10^n))^2}; \\ G. C. Greubel, Mar 08 2019
    
  • Python
    from math import isqrt
    def A061432(n): return (isqrt(10**(n-1)-1)+1)**2 # Chai Wah Wu, Feb 20 2023
  • Sage
    [ceil(sqrt(10^n))^2 for n in (0..20)] # G. C. Greubel, Mar 08 2019
    

Formula

a(n) = ceiling(10^((n-1)/2))^2. - Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 30 2003

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 16 2001